field-guide / rigging-animation
03/10
03task lane

Rigging & animation

Blends, ragdolls, retargeting mocap onto custom rigs.

26.08.05
"A hyphen in a sequence name drops the clip from the compiled model, silently"

An AnimFile whose name contains a hyphen never reaches the compiled model. The fbx bakes, the animation list writes, the vmdl compiles green with no errors and no warnings, and the sequence is simply absent at runtime. The SkinnedModelRenderer.Sequence.Name setter accepts the missing name and echoes it back, so the obvious guard cannot fire. Sanitise the typed name to one hyphen-free word, and check Sequence.SequenceNames before you assign.

26.07.22
"Attachments and bones read wrong on the spawn frame"

A SkinnedModelRenderer created this frame has no attachment objects yet, and reading a bone before the first pose evaluates returns the bind pose. Resolving a mount in OnStart silently gets nulls or T-pose transforms, no exception either way. Defer and retry.

26.07.22
"Citizen animgraph combat params are unwrapped and unnetworked"

The stock citizen animgraph ships combat params that CitizenAnimationHelper does NOT wrap -- drive them with renderer.Set() directly, and replicate them yourself because the engine only networks locomotion.

26.08.05
"Citizen body aim needs SetLookDirection, not the aim_body floats"

The Citizen animgraph drives body aim from SetLookDirection("aim_body", dir, weight), not from the aim_body_pitch / aim_body_yaw floats. Writing only the floats reads back perfectly and moves the pose zero degrees.

26.07.15
"Citizen held-item pose map: HoldType, aim, and IK hand targets"

HoldType shapes arm+fingers, body aim tilts via SetLookDirection (the aim_body_pitch/yaw floats are readback-only), and an IK hand target OWNS hand position, overriding the holdtype arm pose. Move the IK target to place a held item, use holdtype only for the fist.

26.07.08e
"Cross-fade animations WITHOUT an AnimGraph"

Set Sequence.Blending = true once: per-clip fade_in/fade_out times in the vmdl shape the blend; no AnimGraph required.

26.07.08e
"Foot-sliding on locomotion: pace clips by their authored stride, not the controller's top speed"

Foot-slide happens when PlaybackRate is tied to movement top speed instead of the clip's own authored stride distance.

26.07.08e
"Keep quaternion keys hemisphere-continuous"

Converting euler poses per-key can land on q vs -q. The interpolation takes a violent 360-degree detour. Negate the quat if dot(prev, new) < 0.

26.07.22
"Pace citizen locomotion clips by each clip's own blend-value speed"

The citizen's locomotion clips each carry their own authored ground speed in the animgraph's m_blendValue coordinates. Pacing every clip's PlaybackRate against one guessed nominal speed foot-slides every variant except the one it was tuned for.

26.08.05
"Ragdoll a scripted-rig NPC with pure engine physics"

PhysicsShapeList + PhysicsJointList in the vmdl + ModelPhysics toggle. No collapse clips, no SetBoneTransform. On current builds ModelPhysics.PhysicsGroup reads NULL: enumerate ModelPhysics.Bodies directly and resolve bones by name→index.

26.07.08e
"Retargeting free Mixamo mocap onto a custom rig"

Transfer rest-delta rotations parent-relative (not world): avoid the forward-hunch bug and never transform_apply scale on Mixamo armatures.

26.07.08e
"Rigging an AI-generated (rigless) character mesh"

Bone-heat auto-weights fail on AI meshes. Use scripted geodesic (along-surface) weights, then FBX + animated vmdl.

26.07.08e
"Sequence-only rig: land hands on a moved prop by reseating the visual, not IK"

When a clip already poses hands in a grip and the prop moves/rescales, offset the rendered visual child instead of using IK or SetBoneTransform -- sequence-only rigs have no AnimGraph.

26.07.22
"Set UseAnimGraph = false before writing Sequence.Name, or the write no-ops"

Direct citizen sequence playback needs no AnimGraph, but SkinnedModelRenderer.UseAnimGraph must be set false BEFORE the first Sequence.Name write, or the write silently no-ops while the model's own animgraph keeps driving the pose. The citizen model exposes 466 sequences (raw directional locomotion + IdlePose family), enough for a full movement set with no rig work.

26.07.08e
"The bone-name `.` → `_` compiler trap"

Model compiler rewrites upper_arm.L → upper_arm_L; physics KV3 that still says .L makes limb bodies unknown while the torso works.

26.07.22
"The Citizen ragdoll has 18 bodies and 16 joints, countable offline"

The Citizen ragdoll physics rig has 18 shapes (17 capsules plus 1 cylinder) and 16 joints (12 conical ballsockets plus 4 revolute hinges). A common folk estimate lands near 9 to 13 bodies, roughly half the real count, so it undercounts per-body and joint-solve cost. Both prefab files are plain KV3 text, so you count them offline with no editor running.

26.07.08e
"The FBX export recipe that actually works"

Default −Z/Y axes, bake_space_transform, no leaf bones, X/Z bone axes, mesh FBX + per-clip armature FBX; scale via ScaleAndMirror 0.3937.

26.08.05
"Why SetBoneTransform / SetIk silently do nothing"

SetIk is AnimGraph-gated; SetBoneTransform is unsound on clip-keyed bones. Use proxy props, whole-visual motion, or commit to AnimGraph.

Want to know when new guides or fixes drop? Join the community to help build this out. Report gotchas, flag outdated fixes, or just lurk.

Join the Discord