CapsuleColliderComponent struct in Thread
Y-axis aligned capsule (cylinder with hemispherical caps). For player-controlled motion prefer CharacterControllerComponent — a tuned capsule with slope handling and stair stepping.
Properties
| Radius | float | Radius of the cylindrical body and caps, multiplied by the larger of the entity's X and Z Scale. Default 0.5. |
| HalfHeight | float | Half-height of the cylindrical part (caps extend further by Radius), multiplied by the entity's Y Scale. Default 1.0. |
Total height = 2 · (HalfHeight + Radius). With defaults that's 3 m.
Example
auto& cc = enemy.AddComponent<Thread::CapsuleColliderComponent>();
cc.Radius = 0.4f;
cc.HalfHeight = 0.7f;
enemy.AddComponent<Thread::RigidBodyComponent>().Mass = 70.0f;
CapsuleColliderComponent struct w Thread
Kapsuła wzdłuż osi Y (walec z półkulistymi zakończeniami). Do ruchu sterowanego przez gracza lepiej użyć CharacterControllerComponent — dostrojonej kapsuły z obsługą zboczy i wchodzeniem na schody.
Właściwości
| Radius | float | Promień walca i zakończeń, mnożony przez większą z osi X i Z w Scale encji. Domyślnie 0.5. |
| HalfHeight | float | Połowa wysokości części walcowej (zakończenia wystają o Radius dalej), mnożona przez oś Y w Scale encji. Domyślnie 1.0. |
Całkowita wysokość = 2 · (HalfHeight + Radius). Przy wartościach domyślnych to 3 m.
Przykład
auto& cc = enemy.AddComponent<Thread::CapsuleColliderComponent>();
cc.Radius = 0.4f;
cc.HalfHeight = 0.7f;
enemy.AddComponent<Thread::RigidBodyComponent>().Mass = 70.0f;