/godot-dev:godot-camerafrom godot-dev
Configures Godot cameras: Camera2D follow with smoothing, limits, and look-ahead; Camera3D third/first person on SpringArm3D; camera shake; and jitter/clipping fixes.
Ships in godot-dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Most camera jitter is a camera and a body updated on different ticks.
| Situation | Read |
|---|---|
| "The player shakes on screen", "the world stutters", "smooth at 60 Hz, jittery at 144" | Jitter in one screen below, then reference/jitter.md |
| A 2D follow camera: smoothing, look-ahead, limits from a room or a tile layer, zoom, drag margins | reference/camera-2d.md, resources/follow_camera_2d.gd |
| A third-person camera: orbit, pitch limits, walls in the way, moving relative to the camera | reference/camera-3d.md, resources/orbit_camera_3d.gd |
| First person; switching cameras; cut-scenes | reference/camera-3d.md → "First person" and "Which camera is current" |
| The camera snaps into the character's head or behind a wall | Clipping below |
| Shake on hits and landings | Shake below, resources/camera_shake.gd |
| Pixel-art cameras: snapping, integer zoom | godot-2d-rendering |
| A scene to lint for the known traps | scripts/camera_check.py |
A body moved in _physics_process changes position only on physics ticks. At a frame rate above
the tick rate (144 Hz against 60) some frames hold no tick, so its per-frame motion is uneven:
10, 0, 0, 10, 0, 10, 0, 0 pixels at 600 px/s. What the player sees as jitter is the target's
offset from the camera centre changing direction from frame to frame. Headless at
--fixed-fps 144, over 60 frames of steady running with interpolation off:
| Set-up | Offset reversals |
|---|---|
Camera2D child of the body, position_smoothing_enabled, default process_callback (idle) | about 50 |
the same with process_callback = CAMERA2D_PROCESS_PHYSICS | 0 |
follow_camera_2d.gd with smoothing and look-ahead (physics tick, after the motors) | 0 |
So the first rule: the camera updates on the tick the target moves. That removes the
character shaking against the screen. What remains is the whole view stepping on ticks, which
physics interpolation removes (physics/common/physics_interpolation, or
SceneTree.physics_interpolation at runtime):
Camera2D.get_screen_center_position moves in equal steps every
frame (4.17 px at 144 fps for a 600 px/s body, against 10, 0, 0, 10 without). A Camera2D
left on the idle callback is run on the physics tick anyway, and the engine prints
WARNING: Camera2D overridden to physics process mode due to use of physics interpolation. when
it enters the tree: set process_callback = 0 in the scene (a script sets it in _init, before
the node enters). The bodies themselves are interpolated in the renderer
(RenderingServer.canvas_item_set_interpolated), which a headless run cannot see.Node3D.get_global_transform_interpolated in _process and switch
the camera rig's own interpolation off. Headless at 144 fps this gives equal steps of 0.0417 m
per frame for a 6 m/s body; the plain global_position gives 0, 0.1, 0, 0.1 ....
orbit_camera_3d.gd does this.Node.reset_physics_interpolation (and Camera2D.reset_smoothing), or the
camera glides across the level. Both scripts' snap() do it.Other causes, how to tell them apart headless, and a sampler to drop into a journey:
reference/jitter.md.
resources/follow_camera_2d.gd extends Camera2D and follows target_path from anywhere in the
tree (the player can be freed or respawned without taking the camera). It sets
process_callback to physics and process_physics_priority = 10, so it aims after motors at
priority 0 in the same tick, adds a capped look-ahead along the target's velocity
(linear_velocity for a RigidBody2D), and offers snap(), fit_limits(rect) and
fit_limits_to_layer(tile_layer).
Limits clamp the centre to limit - visible size / zoom / 2: with limit_right = 1000 the
centre stops at 1000 - 64 / 1 / 2 = 968 in the 64-pixel headless viewport, 984 at zoom 2. A
headless run's viewport is not the project's window size, so a test computes the expected centre
from get_viewport_rect().size, never from display/window/size/*. More: reference/camera-2d.md.
resources/orbit_camera_3d.gd is the pivot: it follows the target's interpolated position plus
pivot_height, holds yaw and pitch (clamped by min_pitch_degrees and max_pitch_degrees),
and builds SpringArm3D → Camera3D under itself if they are missing. Feed apply_look() with
the reader's look (godot-input) or a stick times delta; move_direction(stick) turns a stick
vector into a flat world direction relative to the camera's yaw, for the motor
(godot-3d-controller).
The arm casts a sphere (probe_radius, default 0.2 m) along its +Z and puts the camera at the
first hit minus the radius and the arm's margin. Headless, case by case:
| Case | Arm length (spring 4 m) |
|---|---|
| open space | 4.0 |
| a wall face at 2.4 m, sphere 0.2, margin 0.01 | 2.19 |
| the same wall with a ray (no shape) | 2.39 |
the wall's layer not in the arm's collision_mask | 4.0 — the camera goes through it |
| the camera pitched low, so the cast passes through the player's own capsule | 0.30 — the camera lands in the character |
the same, the body excluded with SpringArm3D.add_excluded_object | 4.0 |
| a cast that starts inside the player's shape (pivot inside the capsule) | 4.0 — not hit |
So: the arm's mask holds the level's layers and not the player's, or the rig excludes the body
(exclude_target, on by default, does add_excluded_object(target.get_rid())). A sphere keeps a
radius of clearance; keep probe_radius above the camera's near (0.05 by default) so the near
plane stays out of the wall (how the frame looks there needs a windowed run to confirm).
resources/camera_shake.gd is a Node under a Camera2D or Camera3D. add_trauma(amount)
adds to a trauma value clamped to 1, which falls by decay per second; the offset is
max_offset × trauma² × noise, added to the camera's own offset (h_offset/v_offset in 3D)
and never to its position, so the follow and the limits are untouched. At trauma 0 the camera's
offset is exactly what it was before. The selftest checks the clamp, the bound
|offset| ≤ max_offset × trauma² on every frame, the linear decay (1.0 → 0.4 after 0.4 s at
decay 1.5) and the restore in 2D and 3D.
python3 scripts/camera_check.py /path/to/project # WARN and NOTE lines, exit 0
python3 scripts/camera_check.py /path/to/project --strict # warnings fail (exit 2)
python3 scripts/camera_check.py --selftest # the resources, headless
The lint reads scenes as text: idle-smoothing (a smoothed Camera2D on the idle tick under a
physics body, interpolation off), idle-with-interpolation (a Camera2D on the idle tick with
interpolation on: the engine's WARNING above) and arm-on-body (a SpringArm3D under a body with
no script to exclude it). The selftest runs the three resources in a temp project: the follow
after N ticks, the jitter table above, look-ahead, limits from a rectangle and a TileMapLayer,
snap(), the clipping table, pitch clamping and move_direction, the shake, the 2D and 3D
follow with interpolation on and off, and the engine's WARNING for an idle camera.
position is the 3D equivalent of two
motors.snap(). A respawn without it is a camera flying across the level.godot-verify.godot-inputgodot-2d-renderinggodot-2d-controller · godot-3d-controllergodot-physicsgodot-play-harnessreference/camera-2d.md (opens in a new tab)reference/camera-3d.md (opens in a new tab)reference/jitter.md (opens in a new tab)resources/camera_shake.gd (opens in a new tab)resources/follow_camera_2d.gd (opens in a new tab)resources/orbit_camera_3d.gd (opens in a new tab)scripts/camera_check.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
godot-camera, camera-jitter, camera2d, camera3d, springarm3d
Other plugins' skills for the same job
npx claudepluginhub tipoli5890/game-studio --plugin godot-dev28 skills in this plugin
/godot-2d-controllerMove a 2D character in Godot: CharacterBody2D jump, coyote time, jump buffer, slopes, one-way and moving platforms, top-down movement./godot-2d-renderingGodot 2D look: draw order, z_index and y-sort, CanvasLayer, 2D lights and shadows, canvas shaders, Parallax2D, pixel-perfect scaling./godot-2d-rigA layered 2D character into Godot: rig2d.json to Skeleton2D, Bone2D and weighted Polygon2D parts, cut-out animation, 2D IK./godot-2d-spritesSprite frames into Godot: frames.json to SpriteFrames, AnimatedSprite2D, sheet slicing, pivots, filtering and import for pixel art./godot-3d-controllerMove a 3D character in Godot: CharacterBody3D grounding, slopes and steps, third and first person, lane runner, click-to-move./godot-3d-modelsBring a glTF model into Godot: import settings, post-import script, materials, LODs, collision; audit it against a triangle and texture budget.