Skip to content

Character Controller

Players and walking NPCs do not use a plain rigid body, they use a character controller: a capsule that climbs steps, slides along walls, and never tips over. It is three components on one entity:

ComponentRole
Character PhysicsThe collision capsule (radius, half height) and how it handles slopes, steps, and pushing dynamic bodies.
Character MovementThe feel: speed, acceleration, jump, gravity, air control, rotation.
Character ControllerThe intent layer your script talks to.

Add all three in the Details panel to make an entity a character.

On Character Movement you shape how it feels: Move Speed, Acceleration and Deceleration, Jump Speed, Max Jump Count (set 2 for a double jump), Air Control, Ground Friction, Gravity, and Rotation Rate. It also reports read-only Grounded and Velocity.

How it handles terrain is set on Character Physics with Max Slope Angle (the steepest walkable incline) and Step Height (the tallest ledge it climbs automatically).

Talk to the Character Controller, not the transform. Feed it intent each frame and the movement system resolves it on the physics step:

local Controller: SCharacterControllerComponent = self:GetComponent(SCharacterControllerComponent)
Controller:AddMovementInput(Direction) -- accumulate a world-space move direction
Controller:AddYaw(Turn) -- look left and right
Controller:Jump() -- jump this frame

Other methods: AddLookInput, AddPitch, GetLookForward, GetLookRight, Launch(velocity, overrideHorizontal, overrideVertical) for jump pads and knockback, and TeleportTo(location) for respawns.