Character Motor
Moves the character at a fixed rate and lets each module take its turn. Every jump is the same on every machine, so the feel you tune is the feel players get.
The character itself: every module plugs into it. It steps the character at a fixed rate, picks which state moves it, and hands each module the same picture of the world. Because the step rate is fixed, a jump is the same height on every computer, and a recorded run plays back exactly.
How it works
Runs a character built from modules on the same GameObject, at a fixed step rate:
1. Command one CharacterCommand from the CommandSource
2. Sense sensors fill MotorContext.senses (ground, ...)
3. Select the state machine picks the active state (modifiers' PreTick runs just before)
4. Simulate the active state changes the velocity and fills the move request
5. Move the solver sweeps the hull and slides along what it hits
6. Resolve post-move modifiers, sense again, landing and step events
7. Publish snapshot for cameras, HUD and (later) animation
The motor is kinematic: no Rigidbody, no CharacterController. It never reads devices and never touches an Animator. Its transform is the feet position and is never rotated; the facing lives in the snapshot.
Combine it
- Used by the presets: Arena Shooter, Competitive Shooter, Surf, Retro Platformer, Modern Platformer, Traversal Adventure, Action RPG.
Properties
| Property | Description | Range | Default |
|---|---|---|---|
| Tick Rate | Simulation steps per second. Movement is the same at any frame rate. | 10 to 250 | 60 |
| Interpolate | Smooth the rendered position between simulation steps. | On | |
| Max Slope Angle | Steepest slope, in degrees, the character can stand and walk on. | 0 to 89 | 45 |
| Eye Height | Eye height above the feet, used by camera rigs, metres. | 0 or more | 1.6 |
| Eye Height Transition | Seconds the eye takes to follow a change of hull height (crouching); the collider changes at once. | 0 or more | 0.15 |
| Body Facing | Who turns the body: the camera's view, the movement, or the states. | View | |
| Body Turn Rate | With Body Facing on Movement: how fast the body turns toward where it moves, degrees per second. | 0 or more | 720 |
| Initial State | State to start in. Empty: the state machine picks one on the first step. | None |