#animation
18 items (3 guides · 15 fixes)
The division of labor for authoring s&box animation with agents: the owner authors hero poses in the Animate studio, agents build the motion around them against a numeric definition of done, and the owner taste-gates frames, never live sessions. Covers the pose-to-pose synthesis pattern, numeric acceptance, and the sequence-time traps that break freeze-at-end logic.
The method for hanging custom models off the player rig -- gadgets, backpacks, held items -- with three mount styles off one skeleton, and a live slider panel that dumps C#-ready constants for paste-back.
The method for a CS/Rust-style two-view split off one player rig: third person shows the world model, first person hides it and shows a camera-attached viewmodel (arms + held item). Covers hysteresis, tag-based per-view exclusion, the ShadowRenderType correction, and viewmodel composition.
Deriving a visual's facing from horizontal velocity causes 180-degree snaps on any momentum reversal. Lock facing to an attach-time azimuth for pendulums and oscillators.
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.
Components.Get<SkinnedModelRenderer>() only searches the same GameObject: a renderer on a child returns null, silently no-oping every Set() call.
Set Sequence.Blending = true once: per-clip fade_in/fade_out times in the vmdl shape the blend; no AnimGraph required.
CSS @keyframes plus the animation: shorthand are supported in s&box razor SCSS, so a spinner or looping effect is pure CSS -- do not drive it from a per-frame BuildHash re-render.
Foot-slide happens when PlaybackRate is tied to movement top speed instead of the clip's own authored stride distance.
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.
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.
Transfer rest-delta rotations parent-relative (not world): avoid the forward-hunch bug and never transform_apply scale on Mixamo armatures.
Bone-heat auto-weights fail on AI meshes. Use scripted geodesic (along-surface) weights, then FBX + animated vmdl.
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.
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.
Model compiler rewrites upper_arm.L → upper_arm_L; physics KV3 that still says .L makes limb bodies unknown while the torso 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.
SetIk is AnimGraph-gated; SetBoneTransform is unsound on clip-keyed bones. Use proxy props, whole-visual motion, or commit to AnimGraph.