Struct · Ara
CharacterController2d
Kinematic capsule character: slopes, steps, ground snapping and pushing. The entity needs no RigidBody2d/Collider2d; the controller owns its capsule.
public struct CharacterController2d : IComponent<CharacterController2d>Properties
TypeIndex
public static uint TypeIndex { get; }Stable engine component index.
Fields
Radius
public float Radius;Capsule radius.
Unit: m. Range: [0.001, ∞]. Default: 0.3.
Height
public float Height;Complete capsule height; must exceed twice the radius.
Unit: m. Range: [0.001, ∞]. Default: 1.8.
MaxSlopeDeg
public float MaxSlopeDeg;Maximum walkable slope angle.
Unit: deg. Range: [0.1, 89.9]. Default: 45.
StepHeight
public float StepHeight;Maximum step height climbed automatically; zero disables stepping.
Unit: m. Range: [0, ∞]. Default: 0.25.
StickDown
public float StickDown;Distance searched below the feet to stay on descending ground; zero disables it.
Unit: m. Range: [0, ∞]. Default: 0.2.
Padding
public float Padding;Collision padding kept between the capsule and the world.
Unit: m. Range: [0.0001, ∞]. Default: 0.01.
Layer
public uint Layer;Collision group used for movement queries.
Range: [1, 15]. Default: 1.
Methods
Access
public static ref CharacterController2d Access(Entity entity, bool write);No description yet.
Insert
public static void Insert(in Commands commands, Entity entity, in CharacterController2d value);No description yet.
Contains
public static bool Contains(Entity entity);No description yet.