character-animation-wiring is a skill from the Summer skill library: a guide your AI agent reads when the task matches, so it builds the good version on the first try. Wire a rigged character end to end: real clips and bones, locomotion states, method tracks, root motion.
When your agent uses it
- A rigged GLB or Meshy rig with generated clips is in the scene and needs idle/walk/run wiring with blend times
- Footstep or attack-frame events, head tracking, still poses, blend-shape facial keys, or root motion must be hooked up
- The user says the character slides while walking, or the GLB has animations but nothing plays
Install
summer setup installs every skill for your agent. To add only this one:
claude-code for your agent, such as codex or cursor. See Skills for every option.
The skill
The game-critical path: a rigged, animated character lands in the scene — fromassets.generate_3d({ ..., rig: true }) + assets.generate_motion, or an imported GLB — and nothing moves yet. This skill wires it end to end: inspect what actually arrived, build locomotion, fire gameplay events off animation frames, add poses and head tracking, key the face, and handle root motion. Then prove it in a playtest — a wired tree that was never played is a claim, not a result.
Two lanes throughout:
- ctx lane (animation-tier engines): the animation ctx helpers on
summer_run_script—anim_state_machine,animate_method,bone_pose,look_at_modifier, plus theanimate()v2 extensions. One script per step, owner handled, failures come back as report entries. - raw lane (any engine): the same wiring through plain GDScript in
summer_run_script— the Animation/AnimationTree classes are fully script-bound, just verbose. On an older engine a missing ctx helper is a plainInvalid call to method ...script error; fall back to the raw lane, which works everywhere.
scene-scripting for the full stdlib):
When to use this skill
- A rigged GLB with clips is instanced and the character T-poses or slides.
- “Make the goblin idle, walk when moving, run when sprinting.”
- Footstep sounds / attack hit-frames need to fire at exact animation times.
- A corpse/statue/mannequin needs a still pose; an NPC head should track the player.
- The character visibly moonwalks — the clip translates the root but the body stays put (root motion).
When NOT to use this skill
- No clips yet — generate first via
generate-motion(rigged Meshy target) or import them. - Continuous walk↔run blending by speed, upper-body attack overlays, OneShot hit reactions — that graph design lives in
animation-tree; this skill’s state machine is the discrete idle/walk/run backbone. - Foot IK, additive lean, ragdoll —
procedural-animation. - Full viseme lipsync from audio —
facial-and-lipsync(this skill covers the blend-shape keying mechanism it builds on).
Step 1 — Inspect what actually came in
Never wire against assumed clip names or bone names. Imports differ: the AnimationPlayer may be nested inside the instance, clips may be namespaced (walk vs Walking_Woman vs mixamo_com), bone names vary by rig source. The instance’s internals are not owned by the edited scene, so pass owned: false when searching:
generate-motion / retarget before wiring anything.
Step 2 — Locomotion state machine (ctx lane)
ctx.anim_state_machine gets-or-creates the AnimationTree, wires it to the found (or given) AnimationPlayer, builds the AnimationNodeStateMachine, and sets active = true:
.gd):
travel() is the discrete backbone. When the user wants a continuous speed blend or attack/hit overlays, extend the tree per animation-tree — those node types are beyond the anim_state_machine spec dict.
Step 3 — Method tracks: footsteps and attack frames
Gameplay events that must land on an animation frame (footstep audio at heel-strike, damage at the blade’s contact frame) belong in a method-call track, not a timer:summer_get_script_errors. Play the event clip alongside its motion clip (same timings) from the same tree. Method tracks fire during playback in the running game; a successful script result proves the track exists, not that the method fires — verification is a playtest where the footstep actually sounds.
Step 4 — Still poses and head tracking
A corpse over a railing, a statue mid-swing, a mannequin — edit-time poses, no clip needed:LookAtModifier3D under the skeleton:
prop_warnings — read them. Angle limits, influence fade-out by distance, and spine-chain distribution are the difference between alive and possessed: tune per procedural-animation (A1/A2).
Step 5 — Facial keys via blend shapes
animate() accepts "blend_shapes/<name>" property paths (value tracks, weights 0..1) against the MeshInstance3D that owns the shapes — names come from Step 1’s report:
facial-and-lipsync. Bone-track keyframes work the same way through animate() v2 — ctx.animate(character, "Skeleton3D:Head/rotation", keys, "nod") creates a proper bone rotation track (the helper owns the quaternion conversion; never hand-build quaternion tracks).
Step 6 — Root motion
Meshy/mocap locomotion clips translate the root bone forward (Meshyrun moves ~5m per cycle). Two valid setups — pick one, never both:
- In-place movement (default): code drives
velocity, the clip should NOT translate the root. If the character lunges forward and snaps back every loop, the clip has baked root translation — strip it or switch to setup 2. - Root motion: the clip drives movement. Requires, on the AnimationTree:
root_motion_trackset to the root bone’s track path (e.g."Skeleton3D:Hips"— the skeleton node path from Step 1, colon, the root bone name), then in_physics_processapplytree.get_root_motion_position()/get_root_motion_rotation()to the CharacterBody3D instead of input-driven velocity. ARootMotionViewnode visualizes the extracted motion in the editor (editor-only helper; it is invisible in the shipped game).
get_root_motion_* application code.
Root motion CANNOT be judged from the editor state. Playtest it: summer_play, then summer_get_runtime_tree + summer_inspect_runtime_node on the character — its live global_position must advance while walking — plus summer_screenshot target:"game" for the pixels. Claim only what those reads show.
Raw lane — the same wiring on older engines
Every class above is script-bound;ctx.anim_state_machine is convenience, not capability. The raw locomotion wiring:
anim.add_track(Animation.TYPE_METHOD) + track_set_path(idx, path_to_node) + track_insert_key(idx, t, {"method": "play_footstep", "args": []}), then player.get_animation_library("").add_animation(name, anim) (get-or-create the library — add_animation_library("", AnimationLibrary.new()) when missing; this library step is the one agents get wrong). Still poses raw: skel.set_bone_pose_rotation(skel.find_bone("Head"), quat). Verify unfamiliar members with summer_api_docs first — never guess.
The verification loop (every step)
summer_world_snapshotbefore; keep thesnapshot_id.- Run the script; read
errors,reports,prop_warnings,rolled_back. summer_snapshot_diff from_id:<id>— exactly the nodes you meant (AnimationTree added, nothing vanished).summer_save_scene, then behavior:summer_play→summer_get_runtime_tree/summer_inspect_runtime_nodefor live state,summer_screenshot target:"game"for pixels →summer_stop.- Claim only what the capture and the runtime reads show. “The script succeeded” is not “the character walks.” Full discipline:
verifying-scenes.
Red Flags — STOP
Handoff
- Blend spaces, OneShot attacks/hit-reacts, upper-body filters —
animation-tree. - Foot IK, additive lean, ragdoll —
procedural-animation. - Audio-synced lipsync on the blend shapes —
facial-and-lipsync. - Clips missing or on the wrong rig —
generate-motion,retarget. - NPC behavior deciding when to travel/fire states —
design-npc.
See also
scene-scripting— the ctx stdlib contract, owner rules, budgets, undo/rollback.verifying-scenes— snapshot/diff/screenshot/runtime-read discipline this skill leans on.
From a shell
No Summer MCP tools in this session? Run each one as a command; whensummer --version is missing or below 4.0, use npx -y summer-engine@latest in place of summer. Fields are flags in kebab-case (--scene-path res://main.tscn) or one --input '<json>', and summer ops describe <op> prints the exact input. The summer-cli skill has the rest.
Related skills
animation-tree: Wire AnimationTree state machines and blend trees: locomotion blends, attack interrupts, hit reactions.generate-motion: Attach a library animation clip (idle, walk, run, attack) to a rigged character via AnimationPlayer.retarget: Apply animation clips from one rigged character to another: one clip library, many models.procedural-animation: Runtime bone changes on top of clips: head look-at, foot IK, hand grabs a prop, lean, recoil.facial-and-lipsync: Make a character’s mouth move with a voice-over: phonemes, viseme blendshapes, facial expressions.design-npc: Design enemy, NPC, boss or companion behavior: perception, state machine, telegraphs, script stub.scene-scripting: Build scenes, levels, HUDs and wiring with one editor GDScript (summer_run_script) instead of call chains.verifying-scenes: Prove scene work landed: snapshot, diff, screenshots, runtime reads, 3D audits, shot sheets and zooms.
Source:
library/skills/character-animation-wiring/SKILL.md, rendered from summer-engine@4.3.0 on npm.
