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.
Don't mix them. One player — one controller. Pick based on your camera perspective.
The CC controller uses Unity's built-in CharacterController component and the Input System. Both are added automatically when you add the script.
CharacterControllerCC to a Capsule or your character mesh. Unity will auto-add a CharacterController and PlayerInput. Set the player's tag to Player.PlayerInput component, assign the EGTK_InputSystem_Actions asset (found in the package root). Set Default Action Map to Player and Behavior to Send Messages.3rd Person Follow or Orbital Follow body for orbit controls. The controller reads the main camera direction automatically.CharacterControllerCC, drag the CharacterController component into the Controller field. This is required — the script won't move without it.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.
CharacterController and PlayerInput automatically. Assign EGTK_InputSystem_Actions to PlayerInput with Default Map = Player, Behavior = Send Messages.CharacterControllerFP, drag the child camera object into the Player Camera slot. Without this, mouse look won't work. Set the player tag to Player.Platform) and assign it to your moving platform. On the controller, set Platform Tag to match.PhysicsPlatformAnimator (Rigidbody-based) rather than moving the Transform directly. The controller reads Rigidbody velocity to calculate platform movement. Wire any event → PhysicsPlatformAnimator.Play().SpawnPoint component in the scene on Awake — before physics initializes — so the player always starts at the right location.SpawnPoint component, and position it where the player should start. The controller finds it automatically — no wiring needed. For checkpoints, use InputCheckpointZone which also implements the spawn interface.Both controllers share most movement fields. FP-only fields are marked.
| Field | Default | What it does |
|---|---|---|
| Move Speed | 8 / 6 | Base movement speed in units/second. CC default: 8. FP default: 6. |
| Jump Height | 1.2 | Height in meters of a single jump. Increase for floaty platformers. |
| Gravity | -20 | Downward acceleration. More negative = heavier, snappier. Default -20 is heavier than Unity's -9.8. |
| Max Slope Angle | 45° | Steeper slopes than this cause the character to slide. Matches CharacterController's slope limit by default. |
| Enable Sprint | false | Enables the Sprint input. When on, hold the sprint button to move at speed × Sprint Speed Multiplier. |
| Dodge Distance | 5 | How far a dodge covers. Set to 0 to effectively disable dodge without hiding it in the Inspector. |
| Dodge Mode | Forward | Forward: dodge toward the movement direction. Lateral: sidestep left or right based on last lateral input. |
| Movement Space | Camera Relative | (CC only) How WASD maps to world direction. Camera Relative, World Space, Transform Relative, or Tank Controls. |
| Mouse Sensitivity | 2 | (FP only) Mouse rotation speed. Adjust to taste — higher = faster turn. |
| Mouse Smooth Time | 0.03 | (FP only) Smoothing lag on mouse look. 0 = raw, 0.03 = subtle, 0.1 = noticeable lag. |
| Lock Cursor On Start | true | (FP only) Hides and locks the mouse cursor when Play is pressed. Press Escape to release in-editor. |
| Platform Tag | Untagged | Tag used to identify moving platforms. Change to match whatever tag you assign to platform objects. |