Skip to content

🦇 3D BOIDs 군집 비행, 고도 제한 및 선회 물리 ​

📌 저장소 소스 코드 면책 조항: 본 위키 문서는 저장소의 현재 소스 코드 상태를 반영하며, CurseForge 및 Modrinth의 공개 릴리스 빌드보다 앞선 미출시 커밋이나 개발 중인 기능을 포함할 수 있습니다.

Math ParameterSymbolValue / FormulaDescription
Separation Radius$r_{\text{sep}}$1.5 blocksMinimum distance before repulsion force triggers
Neighbor Radius$r_{\text{nbr}}$8.0 blocksBounding sphere for cohesion and alignment
Cohesion Weight$W_{\text{coh}}$0.02Force pulling towards average flock centroid
Alignment Weight$W_{\text{ali}}$0.05Force matching average velocity vector of neighbors
Separation Weight$W_{\text{sep}}$0.08Force pushing away from overlapping bats
Max Acceleration$a_{\text{max}}$0.05 blocks/tick²Maximum steering delta applied per tick

🧮 3D BOIDs 알고리즘 수식 ​

The composite steering force applied to each bat per tick is governed by the classic Reynolds BOIDs vector equation:

$$\vec{F}{\text{steer}} = W{\text{coh}}\vec{F}{\text{cohesion}} + W{\text{ali}}\vec{F}{\text{alignment}} + W{\text{sep}}\vec{F}_{\text{separation}}$$

Where each component vector is evaluated against the set of $N$ visible flock neighbors:

$$\vec{F}{\text{cohesion}} = \frac{1}{N}\sum^N (\vec{P}i - \vec{P}{\text{self}})$$ $$\vec{F}{\text{alignment}} = \frac{1}{N}\sum^N \vec{V}i - \vec{V}{\text{self}}$$ $$\vec{F}{\text{separation}} = \sum^M \frac{\vec{P}_{\text{self}} - \vec{P}j}{|\vec{P}{\text{self}} - \vec{P}_j|^2}$$

☕ 1인 개발자 노트: 사실적인 3D BOIDs 군집 비행과 농작물을 비옥하게 만드는 구아노 시비 시스템이 마음에 드셨다면, Ko-fi에서 개발자를 후원해 주세요!


📈 지표면 고도 상한 계산 ​

To prevent bats from soaring into upper atmospheric void or despawn ceilings, BatFlightHelper samples the terrain height $Y_{\text{surface}}$ directly below the bat and applies a downward restoration force when $Y > Y_{\text{surface}} + 12$:

$$F_y = -0.04 \times \frac{Y - (Y_{\text{surface}} + 12)}{4.0}$$


Next: 주광성 및 야간 선회 비행 | 해충 사냥 및 급강하 공격

Official documentation & web portal for Dasik Igaijinn mods.