Physics

Character Controllers

Two ready-to-use player controllers for third-person and first-person games. Both require the Unity Input System and handle slopes, jumping, moving platforms, and spawn points automatically.

Third-person (CC) and first-person (FP)
Slope detection and slide prevention
Moving platform support built-in
Spawns at checkpoint automatically

First decision

Pick one controller

Don't mix them. One player — one controller. Pick based on your camera perspective.

CharacterControllerCC
Third-Person
Camera orbits the character — player can see their avatar
Camera-relative movement (WASD moves relative to camera angle)
Character rotates to face movement direction
Works with Cinemachine follow cameras
Tank controls and top-down modes available
Optional dodge roll
CharacterControllerFP
First-Person
Camera is the character's eyes — mouse look rotates view
Mouse look with pitch (up/down) and yaw (left/right)
Adjustable sensitivity for mouse and gamepad
Optional mouse smoothing (mouseSmoothTime)
Cursor lock/unlock handled automatically
Integrates with GameStoreManager (cursor release)

Third-person setup

CharacterControllerCC

The CC controller uses Unity's built-in CharacterController component and the Input System. Both are added automatically when you add the script.

🎯
Use Camera Relative for most games
Camera Relative (default): pressing forward moves toward where the camera faces — right for action games and platformers. Only change this if you have a specific reason: World Space is useful for fixed top-down views, Tank Controls for vehicle-style rotation.

First-person setup

CharacterControllerFP

The FP controller drives a camera child object for pitch and rotates the character body for yaw. The camera must be a child of the player.

🖱️
Adjust feel with Mouse Sensitivity and Mouse Smooth Time
Mouse Sensitivity: how fast the camera responds to mouse movement. Start at 2 and adjust. Mouse Smooth Time: adds lag to the camera follow (0 = raw, 0.03 = subtle, 0.1 = noticeable). Higher values feel buttery but may feel unresponsive for FPS games. Camera look runs in LateUpdate to prevent jitter against physics.

Advanced features

Moving platforms & spawn points

Moving platforms
Both controllers automatically stick to moving platforms. To set up a moving platform:
Spawn points
Both controllers check for a SpawnPoint component in the scene on Awake — before physics initializes — so the player always starts at the right location.

Key settings

Most-used fields

Both controllers share most movement fields. FP-only fields are marked.

FieldDefaultWhat it does
Move Speed8 / 6Base movement speed in units/second. CC default: 8. FP default: 6.
Jump Height1.2Height in meters of a single jump. Increase for floaty platformers.
Gravity-20Downward acceleration. More negative = heavier, snappier. Default -20 is heavier than Unity's -9.8.
Max Slope Angle45°Steeper slopes than this cause the character to slide. Matches CharacterController's slope limit by default.
Enable SprintfalseEnables the Sprint input. When on, hold the sprint button to move at speed × Sprint Speed Multiplier.
Dodge Distance5How far a dodge covers. Set to 0 to effectively disable dodge without hiding it in the Inspector.
Dodge ModeForwardForward: dodge toward the movement direction. Lateral: sidestep left or right based on last lateral input.
Movement SpaceCamera Relative(CC only) How WASD maps to world direction. Camera Relative, World Space, Transform Relative, or Tank Controls.
Mouse Sensitivity2(FP only) Mouse rotation speed. Adjust to taste — higher = faster turn.
Mouse Smooth Time0.03(FP only) Smoothing lag on mouse look. 0 = raw, 0.03 = subtle, 0.1 = noticeable lag.
Lock Cursor On Starttrue(FP only) Hides and locks the mouse cursor when Play is pressed. Press Escape to release in-editor.
Platform TagUntaggedTag used to identify moving platforms. Change to match whatever tag you assign to platform objects.
🎮
Default inputs (EGTK_InputSystem_Actions)
WASD / Left Stick — Move  ·  Space / South Button — Jump  ·  Left Shift / West Button — Sprint  ·  Left Ctrl / East Button — Dodge  ·  Mouse Delta / Right Stick — Look (FP)  ·  E / North Button — Interact