Work in progress. These docs are new and are likely missing a lot of info. If you notice something wrong or missing, open an issue. PRs are welcome as well.

Character controllers

The character controller handles walking, running and jumping, with collision against the world.

Adding one

Add a CharacterControllerComponent to an entity. By default it's driven by keyboard input:

Action Key
Move W A S D
Sprint Shift
Jump Space

isOnGround is true while it's standing on something.

Movement settings

Setting What it does
moveSpeed Walking speed. Starts at 5.
sprintSpeed Running speed. Starts at 7.5.
stepHeight The tallest step it can walk straight up.
maxSlopeAngle The steepest slope it can walk up, in degrees. Starts at 45.

Jump settings

Setting What it does
speed Initial jump speed.
coyoteTime Grace period for jumping after leaving a ledge.
bufferTime How early before landing a jump press still counts.

In multiplayer

The local player's movement is predicted on the client, so input responds immediately. The server validates each move and corrects the client if they disagree. More in replication.

Improve this page on GitHub