Scripting API

CharacterController

class in UnityEngine · UnityEngine.PhysicsModule · inherits from Collider

15 of 15 of Unity's membersUnity's documentation
In Tassix

A capsule moved by script with collide-and-slide, stepping and slope limits: PhysX's capsule controller, as in Unity. It is a collider too (triggers and rigidbodies see it), but forces don't move it.

Properties 12

Vector3 center { get; set; }
CollisionFlags collisionFlags { get; }
bool detectCollisions { get; set; }
bool enableOverlapRecovery { get; set; }
float height { get; set; }
bool isGrounded { get; }
float minMoveDistance { get; set; }
float radius { get; set; }
float skinWidth { get; set; }
float slopeLimit { get; set; }
float stepOffset { get; set; }
Vector3 velocity { get; }

The velocity of the last move (its displacement over the frame's time).

Methods 2

CollisionFlags Move(Vector3 motion)

Moves by motion, sliding along what it hits.

bool SimpleMove(Vector3 speed)

Moves at speed (Y ignored) with gravity, as Unity does: horizontal speed applies only while grounded, and the fall speed accumulates while airborne. Returns whether it is grounded.

Checked against Unity

Conformance scenarios that exercise it, recorded in Unity and compared event by event.