Game dev
Saved & recent

Character controller

Related terms: kinematic character, step offset, slope limit, move and slide

Player characters rarely use full physics. A realistic body slides, tips over and bounces, which makes for terrible controls. A character controller is a capsule moved directly by code. It collides and slides along surfaces but ignores forces.

It handles the rules of walking: stepping up small ledges, climbing slopes up to a limit, staying glued to the ground downhill. Much of how a platformer feels is decided here.

Further reading
Epic Games: Movement Components
step walkable slope slope limit controller capsule
The capsule clears a short step and follows a gentle slope. At the steep ramp it stops while retaining its upright shape.

View in the full Game dev collection