CharacterController moves a capsule collider through the scene using trace-based collision. It does not use forces or a Rigidbody — movement only happens when you call Move() or MoveTo(). This makes it predictable and easy to drive from player input.
CharacterController is not affected by physics forces. Use Punch to add a velocity impulse such as a jump, and manage gravity yourself by decreasing Velocity.z each frame.Shape properties
Radius of the character capsule in world units. Range 0–200.
Total height of the character capsule in world units. Range 0–200.
Maximum height of a step the character can climb without losing speed. Range 0–50.
Movement properties
Maximum slope angle in degrees that is considered walkable ground. Steeper surfaces are treated as walls. Range 0–90.
Rate at which
Accelerate() changes velocity (units per second per second). Range 0–64.How much velocity is preserved when the character hits a wall while airborne.
0 stops dead on impact; 1 reflects fully. Range 0–1.Collision properties
When
true, the controller uses the project’s collision rule matrix (based on the GameObject’s tags) to determine what to collide with, instead of the IgnoreLayers tag set.Tags to ignore during collision traces. Only used when
UseCollisionRules is false.State
Current velocity of the character in world space. Readable and writable. Synced over the network.
true when the character is standing on a surface within StepHeight below its feet. Synced over the network.The
GameObject the character is currently standing on, or null if airborne.The specific
Collider the character is standing on, or null if airborne.The bounding box of the character capsule in local space, derived from
Radius and Height.Methods
| Method | Description |
|---|---|
Move() | Moves the character by its current Velocity for this frame, handling step-up, sliding, and ground detection. Call once per OnFixedUpdate. |
MoveTo(Vector3 targetPosition, bool useStep) | Moves directly toward a target position using trace and sliding. Good for ladders or special movement modes. |
Accelerate(Vector3 vector) | Adds acceleration toward vector at the rate set by Acceleration. Time-delta is applied internally. |
ApplyFriction(float amount, float stopSpeed) | Bleeds off speed proportional to amount. Stops the character if speed drops below stopSpeed. |
Punch(Vector3 amount) | Clears ground state and adds amount directly to Velocity. Use for jumps or knockback. |
TraceDirection(Vector3 direction) | Runs a collision trace from the current position in direction. Returns a SceneTraceResult. |
Complete FPS movement example
The component below reads WASD and mouse input to move and look, handles jumping, and applies gravity. Attach it to a GameObject alongside aCameraComponent on a child object.