# 1. CharacterController vs Rigidbody Characters Part of [[Character Controllers]]. Next: [[2. Movement Metrics Asset]]. > [!note] Verification status > Component behaviour paraphrased from the 6000.5 `CharacterController` Scripting Reference ("not affected by forces and will only move when you call the Move function") and the Character Controller component reference (Skin Width guideline ~10% of radius). **No code here; nothing compiled.** ## 1.1 The two models **CharacterController (kinematic, collide-and-slide)** - It *is* a capsule `Collider` (inherits from `Collider`), but has no Rigidbody behaviour. Nothing pushes it; gravity doesn't exist unless you add it. - You call `Move(delta)` once per frame. PhysX sweeps the capsule, slides along surfaces, climbs steps up to **Step Offset**, refuses slopes steeper than **Slope Limit**, and reports `collisionFlags` (Below / Sides / Above) and `isGrounded`. - Every surface it touches during `Move` raises `OnControllerColliderHit(ControllerColliderHit hit)` on the same GameObject. - **Skin Width** is a penetration allowance - the manual's guideline is ~10% of the radius. Too low = stuck; too high = visible float above ground. **Rigidbody character (dynamic)** - A `Rigidbody` + `CapsuleCollider` simulated by the solver. You steer it by changing `linearVelocity` or adding forces in `FixedUpdate`; gravity, collisions, joints, explosions and moving platforms affect it automatically. - You must solve what CharacterController gives you free: ground detection, slope limits, step-up, not sliding down ramps while idle, not sticking to walls (zero-friction material). ## 1.2 Decision table | Question | CharacterController | Rigidbody | |---|---|---| | Must hit exact metrics (jump height, speed) every time? | **Best** - only your code moves it | Good if you control velocity directly; forces make it drift | | Pushed by explosions, carried by physics platforms, ragdoll blend? | Manual (you add the velocity) | **Free** | | Pushes crates? | Manual via `OnControllerColliderHit` | **Free** (mass ratio matters) | | Stairs and step-up? | **Built-in** (Step Offset) | Manual (Part 4) | | Slopes | **Built-in** limit; you add slide-down | Manual projection + limit | | Runs in `Update` with variable frame rate? | Yes | No - `FixedUpdate` + interpolation | | Networked with client prediction ([[Multiplayer with Netcode for GameObjects]]) | Easier: deterministic-ish, re-simulate by calling Move | Harder: physics state is global | | Interacts with joints (grappling hook, rope swing) | No | **Yes** | | VR rig body | Often (XR toolkits commonly drive one) | Rare | Rules of thumb: - **Platformers, shooters, action-adventure, anything metric-driven** -> CharacterController (or a custom kinematic controller). - **Physics sandboxes, vehicles-on-foot hybrids, ragdoll-heavy, rolling-ball games** -> Rigidbody. - When in doubt, prototype both against the same metrics asset (Parts 2-4) and run the gym (Part 5). That's the point of this series. ## 1.3 What "feel" really means here Rogers (Level 5) argues the character's metrics are the contract the whole level is built on. A Rigidbody controller with forces can be *more* fun in a sandbox but breaks that contract (jump height varies with what you're standing on, slope angle, friction). A CharacterController keeps the contract but feels "dead" unless you add juice: acceleration curves, landing squash, camera impulse ([[Cinemachine 3]]), footstep audio ([[Audio Mixers and Character Audio]]). ## 1.4 Third option: root motion Animation-driven movement ([[3.Root Motion Advanced]]) can feed either controller: read `Animator.deltaPosition` in `OnAnimatorMove` and pass it to `CharacterController.Move` or `Rigidbody.MovePosition`. Metrics then live in the animation clips - harder for designers to tune, which is why this series keeps code-driven motion. ## Docs - `CharacterController`: https://docs.unity3d.com/6000.5/Documentation/ScriptReference/CharacterController.html - Character Controller component reference: https://docs.unity.com/en-us/engine/6000.5/manual/physics-section/physics-overview/character-control-section/class-character-controller - Introduction to rigid body physics: https://docs.unity3d.com/6000.5/Documentation/Manual/RigidbodiesOverview.html