Skip to content

🏮 走光性と夜間の灯火旋回飛行メカニクス ​

📌 リポジトリソースコードに関する免責事項: 本Wikiドキュメントはリポジトリの最新ソースコード状態を反映しており、CurseForgeやModrinthで公開されているリリース版に含まれない開発中機能を含む場合があります。

ParameterSpecification Details
AI Goal Classnet.vanillaoutsider.betterbats.ai.BatHuntLightGoal
Detection Light LevelBlock Light > 8 (LIGHT_DETECT_THRESHOLD)
Continue Light LevelBlock Light > 6 (LIGHT_CONTINUE_THRESHOLD)
Search Radius10 blocks (Deterministic BlockPos.findClosestMatch)
Search ThrottleExecutes light search once every 30 ticks (~1.5s)
Orbit Duration200 to 600 ticks ($10 - 30\text{ seconds}$)
Goal Cooldown200 to 400 ticks ($10 - 20\text{ seconds}$)
Approach ModeCurved banking flight vector ($d > 2.5\text{ blocks}$)
Orbiting ModeTangential velocity vector with sine-wave vertical bobbing
Visual ParticlesCRIT (10% tick probability during orbit)

☕ 個人開発者ノート: 3D BOIDsによるコウモリのリアルな群飛やグアノによる作物施肥を気に入っていただけたら、ぜひ Ko-fi でのご支援をお願いします!


🌙 蛾の効果(The Moth Effect) ​

At night, bats are attracted to artificial light sources (torches, lanterns, campfires, sea lanterns). When within 10 blocks of a valid light block with Block Light > 8, BatHuntLightGoal activates. Bats approach the light and transition into smooth circular orbits.


📐 接線旋回ベクトルの物理数学 ​

The orbital velocity vector is calculated perpendicularly to the radial position vector $\vec{r} = \vec{P}{\text{bat}} - \vec{P}{\text{light}}$:

$$\vec{V}{\text{tangent}} = \frac{(-r_z, 0, r_x)}{|\vec{r}|} \times v{\text{orbit}}$$

A sine-wave vertical modulation adds organic natural bobbing:

$$V_y = A \sin(\omega t)$$


Next: 3D BOIDs群飛と物理計算 | 害虫駆除と急降下戦闘

Official documentation & web portal for Dasik Igaijinn mods.