Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Godot 3d Controller?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/tipoli5890-godot-3d-controller)
---
name: godot-3d-controller
description: >-
Move a 3D character in Godot: CharacterBody3D grounding, slopes and steps, third and first
person, lane runner, click-to-move.
---
# godot-3d-controller — the 3D motor and who owns the transform
A body, an agent or root motion writes the position, and exactly one of them. Pick the owner
first; every other script reads it.
## Load what the situation needs
| The situation | Read |
|---|---|
| A courier walking a rooftop in third person; movement relative to the camera | `resources/character_motor_3d.gd`, then `reference/third-person.md` |
| First person: look turns the body, the head pitches, strafing | `reference/third-person.md` → "First person" |
| Ramps the courier should or should not walk; kerbs and stairs it stops at | `reference/grounding.md` |
| GodotPhysics3D or Jolt Physics; results that differ between machines | `reference/grounding.md` → "Which physics engine" |
| Runs forward on its own, three lanes, swipe or press to change | `resources/lane_runner_3d.gd`, then `reference/lane-runner.md` |
| Point and click, an AI walking a path, a navigation mesh | `resources/click_to_move_3d.gd`, then `reference/navigation.md` |
| "No path on the first frame"; a runtime bake that never shows up | `reference/navigation.md` → "The map is not ready on the first frame" |
| Clips that carry the travel (root motion) | `reference/third-person.md` → "Who owns the transform"; `godot-animation` |
| A greybox route to walk right now | `templates/courier_3d.tscn` |
| Follow, orbit and collision of the camera; jitter | `godot-camera` |
| Collision layers, a body that falls through, a ray that misses | `godot-physics` |
| Actions, mouse capture, rebinding, touch | `godot-input` |
| Importing the courier's model, its scale and its collision | `godot-3d-models` |
| Which genre; level metrics; journeys an agent can replay | `godot-gameplay` · `godot-play-harness` |
## The owners
| Owner | Script | Intent it takes | It reports |
|---|---|---|---|
| the motor | `resources/character_motor_3d.gd` | `move_input` (x right, y back), `press_jump()`, `release_jump()`, `add_look(yaw, pitch)` | `motion_state` (`idle` `walk` `rise` `fall`); `jumped`, `landed`, `stepped`, `state_changed` |
| the lane runner | `resources/lane_runner_3d.gd` | `shift_lane(-1 or 1)`, `press_jump()` | `current_lane`; `lane_changed`, `lane_refused`, `jumped`, `landed` |
| the navigation walker | `resources/click_to_move_3d.gd` | `go_to(point)`, `click(camera, screen_point)` | `walking`; `arrived`, `destination_set`, `click_missed` |
| root motion | the motor, fed by the animation mixer | the clip | the same as the motor |
Each script extends `CharacterBody3D`, has no `class_name` (attach it or `preload()` it) and
puts every number in an `@export`. `read_input` on reads the built-in `ui_*` actions (and a
left click for the walker), which every project has; replace them with the game's own. A
missing action reads as zero. Turn `read_input` off when gameplay, an AI or a journey writes the
intent.
Give the courier a capsule whose `CollisionShape3D` sits half its height above the body's
origin, so the origin is at the feet: every number here (step heights, the ray, the template)
assumes it.
## Probe the controller
`scripts/motor_probe_3d.py` builds each level in code in a throwaway project outside the
repository and runs each scenario alone, at the origin, in its own `World3D`, headless at a fixed
60 Hz, then judges the trajectory:
```bash
python3 scripts/motor_probe_3d.py # the motor
python3 scripts/motor_probe_3d.py --engine jolt --climb slope:40 --block slope:50 --climb step:0.3 --block step:0.45
python3 scripts/motor_probe_3d.py --kind lane
python3 scripts/motor_probe_3d.py --kind click
python3 scripts/motor_probe_3d.py --motor path/to/courier_motor.gd --set step_height=0.25
python3 scripts/motor_probe_3d.py --selftest
```
| Kind | Checks |
|---|---|
| motor | lands; walk (top speed, always on the floor); camera (input read against a camera turned 90 degrees); facing; first-person; slope-ok and slope-steep (30 and 60 degrees); step-ok and step-high (0.25 and 0.6 m); stairs (five 0.2 m risers); apex (within 8% of `jump_height`; a fixed step lands about `v0 * dt / 2` short, 1.151 m of 1.2); input; each `--climb` and `--block` |
| lane | lane-change, lane-edge, lane-jump, lane-input |
| click | nav-go (around a wall, `go_to()` set on the first tick, never inside the wall), nav-click (a ray from a camera picks the point) |
The last line is the verdict, `motor_probe_3d: PASS|FAIL|UNVERIFIED ...`: exit 0, 2 (a check
failed, each on a `FAIL` line), 3 (no Godot, a timeout, no sentinel), 1 a usage error. Any
script or engine error in the run is a `FAIL engine` line; the one exception is a Jolt Physics
job-system message shown as a `NOTE` (`reference/grounding.md`). `--engine godot|jolt` writes
`physics/3d/physics_engine` into the throwaway project; probe with the engine the game uses.
## Discipline
- **One owner, named before code.** Motor, lane runner, navigation walker or root motion:
exactly one calls `move_and_slide()` for the courier. An `AnimationPlayer` track on the body's
position, a tween on its transform, a second script turning it: each is a second writer.
- **Read the camera on the physics tick, flattened.** Forward is the camera's basis projected
onto the floor plane every tick; the motor never stores it.
- **Steps are the motor's, slopes are the engine's.** `floor_max_angle` decides ramps; the
engine climbs no step at all, so `step_height` and `step_reach` come from the level's kerbs
and treads. Probe both sides of each limit.
- **The physics engine is part of the build.** Probe with `--engine` set to what
`project.godot` names; a misspelt name falls back to the default without a message.
- **Ship the navigation mesh baked.** A runtime bake runs on a thread and is awaited; queries
wait for the map's first sync (`go_to()` does).
- **Gameplay reads, presentation reads.** Animation, sound and the camera subscribe to the
signals and `motion_state`; none of them moves the body.