Procedural Animation: Springs, IK, and Living Characters
Spring-damper systems for secondary motion, procedural IK for foot placement, and wiggle bones for soft-body feel. How to make characters feel alive without hand-keying every frame - with Unity and Godot implementation examples.
28 April 2026 ยท 4 min read
Pre-baked keyframe animation is predictable. Every time a character jumps, they play the same arc. Every time an enemy walks, the same foot cycle repeats. Procedural animation generates movement at runtime through code, creating responses that adapt to the environment, react to physics, and feel genuinely alive in ways that no amount of keyframing can replicate.
This does not mean replacing keyframe animation with procedural systems. The best results blend both: keyframes handle intentional, designed movements, while procedural layers handle the secondary organic details that make the scene feel inhabited.
Inverse Kinematics for Foot Placement
The most impactful procedural animation for character feel. IK foot placement means the character's feet correctly conform to uneven terrain: a step up a stair, a foot on a slope, a heel resting on a ledge, rather than floating above or clipping through the surface. The sense of physical presence this creates is remarkable and disproportionate to the implementation cost.
Unity's Animation Rigging package provides IK tools that work with existing Animator rigs. The basic setup: two IK targets (one per foot) that follow the character's animated foot position but are then raycast downward to find the actual ground height. The IK system adjusts the ankle to place the foot on the detected surface. Add pelvis adjustment so the character's hips lower when one foot is elevated and you have a system that handles virtually any terrain convincingly.
Foot planting rules prevent the system from creating unnatural stretches: if the IK adjustment required is larger than a threshold (e.g., 0.3 units), treat it as a step and let the animator's intended foot lift handle the transition.
Procedural Springs for Secondary Motion
Secondary motion is the organic lag and oscillation of non-primary elements: a hat brim, a ponytail, ears, a tail, a character's belly, a backpack, weapon holsters. In pre-baked animation, these must be manually keyframed for every action and transition. With a spring system, they respond correctly to every movement automatically.
A spring system tracks the current value of a transform (position or rotation), applies a force toward a target value proportional to the distance, and applies damping to prevent infinite oscillation. Run this in LateUpdate() to ensure the spring responds to the animation's final state each frame. The two parameters to tune: stiffness (how quickly it pulls toward the target -- higher is snappier, lower is floatier) and damping (how quickly oscillation dies -- underdamped springs oscillate, overdamped springs barely bounce).
Typical values: a light ponytail uses low stiffness (80-120) and low damping (8-12) for a loose, bouncy feel. A rigid antenna uses high stiffness (200-300) and higher damping (15-20) to snap back quickly. Prototype the spring values in play mode with the inspector exposed: the feel difference between stiffness 100 and 150 is significant and worth finding interactively.
Procedural Head Look-At
Characters that rotate their head and partially their spine to look at the player create a sense of awareness and life far beyond their visual fidelity. A character that tracks the player's movement feels present. A character with a fixed forward gaze feels like a prop.
Implementation: blend between the animation's default forward direction and a look-at direction using IK constraints or direct rotation. Apply these constraints: limit the head's total range to 60-70 degrees left/right and 30-40 degrees up/down to avoid unnatural owl-neck rotations. Apply a small lag (spring or smooth damp) so the rotation feels deliberate and considered rather than instant. Blend partially through the spine -- 60% in the head, 30% in the neck, 10% in the upper back -- for a more natural full-body weight to the look.
Camera Bob and Sway
A subtle procedural camera bob during movement -- a slight up-and-down oscillation at the player's step frequency -- adds physicality to first-person or close third-person games. It communicates weight: the camera is attached to a body that has mass and momentum.
The calibration is critical. Too much causes motion sickness (2+ units of vertical travel at walking speed will nauseate a meaningful percentage of players). Too little has no perceptible effect. The sweet spot is nearly invisible -- a 0.1-0.2 unit vertical oscillation at walking speed. Players who see it removed often describe the game as suddenly feeling floaty or weightless, without being able to identify why. Make it toggleable for accessibility.
Sway adds a slight rotational lag when the camera turns -- the camera lags slightly behind the control input, then catches up. Combined with bob, this creates a feeling of genuine embodiment. Both systems should use springs (not linear lerp) for organic easing.
Blending Procedural and Keyframe
The highest-quality character feel comes from using procedural systems as a layer on top of keyframe animation, not as a replacement. The keyframe animation handles the intent and design of the movement. The procedural layer adds physical plausibility and environmental responsiveness. Unity's Animation Rigging package handles this blending natively through IK rig weight parameters.
Start with foot IK: it has the most visible impact and the most direct relationship to world interaction. Add secondary motion springs to 2-3 secondary elements. Add look-at if your NPCs have dialogue or are meant to feel aware. Each system is independent and additive -- adding one does not require the others.
Part of a series
Advanced & Specialised