Skip to content
Back to skills

Godot 3d Controller

ASecurity

Move a 3D character in Godot: CharacterBody3D grounding, slopes and steps, third and first person, lane runner, click-to-move.

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 3, 2026
ai-agentspythongobash

Works with

  • cli

Security analysis

A100/100

Pro scans all 10 files and shows the line behind each finding

Scanned December 3, 2026

npx -y skills add tipoLi5890/game-studio --skill godot-3d-controller --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Godot 3d Controller?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Godot 3d Controller
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tipoli5890-godot-3d-controller/badge)](https://www.skillsdirectory.com/skills/tipoli5890-godot-3d-controller)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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.

Files in this skill

  • SKILL.md6 KB
  • reference/grounding.md5 KB
  • reference/lane-runner.md2.9 KB
  • reference/navigation.md4.2 KB
  • reference/third-person.md3.9 KB
  • resources/character_motor_3d.gd9.3 KB
  • resources/click_to_move_3d.gd3.8 KB
  • resources/lane_runner_3d.gd4.9 KB
  • scripts/motor_probe_3d.py40.2 KB
  • templates/courier_3d.tscn3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.