Constraints
Path constraints
A path constraint makes bones ride along a path. The path is a Bezier curve that you draw in a slot, and the constraint lays the bones out on it, one after another, and turns them to follow the curve. That is how a snake bends along its track, how the cars of a train follow rails and how a tail traces a spline. This article shows how to create a path constraint, what the rows of the Constraints panel mean, how Position and Spacing place the bones, how the three Rotate modes turn them, how the mixes work, and how to animate a bone along a path.

How a path constraint works#
A path constraint has a Target, which is a slot with a path attachment (see Path), and one or more constrained bones. The constraint takes the path that is visible in the Target slot, in any skin, and puts the first bone at a distance Position from the start of the curve. Each next bone is placed after the previous one at a distance given by Spacing. Then every bone is rotated according to the Rotate mode and blended with its own pose by the mixes.
A path constraint is solved in the shared order of the Constraints panel together with IK and transform constraints, so it sees the pose of the constraints above it (see IK constraints). If the Target slot has no visible path, or all three mixes are 0, the constraint does nothing and the bones keep their own pose. The curve may be weighted or deformed in an animation; the bones follow the curve as it is at that moment.
Creating a constraint#
Select the bones that should ride along, right-click one of them in the Tree, choose New and Path Constraint. A list of the slots that hold a path opens, and the slot you choose becomes the Target. The entry is unavailable until the skeleton has at least one path, because there is nothing to follow. The creation is one undo step.
The New button in the Constraints panel opens the New constraint dialog. Choose the Path type, pick the slot in the Target list, which starts as Choose a Path slot…, and click Create Path. If there is no path in the skeleton the Path card is dimmed and its tip says Create a Path attachment first. The constrained bones are the bones selected when you open the dialog. The chain is always sorted in the order of the skeleton, not in the order you clicked.
A new constraint is named Path constraint, Path constraint 2 and so on, and is added at the end of the order. It uses the defaults: the first bone at the start of the path, bones spaced by their own length and rotated along the tangent, all mixes at 100%. Both lists offer slots that have a path in any skin.
The rows of the panel#
Select the constraint in the Constraints panel or in the Tree, where it sits in the Constraints section. The Properties panel shows the same detail under the header Path Constraint. The header of the detail reads Path · 1 bone.
Bones lists the constrained bones as chips. A click on a chip removes that bone, and the last bone cannot be removed. The crosshair at the end of the row adds a bone from a list. Target is a chip with the slot; click it to choose another slot from the list of slots with a path, or use the crosshair. Offset is the rotation offset in degrees, and Mix XY holds the two translation mixes. Skin has the Skin required switch, explained at the end of the article. Under them is the Mix slider, which sets the rotation mix and is described in the section on mixes. Every change is one undo step.
The list at the top of the panel shows the constraint with its target slot and its mix, the eye of its row sets the mix to 0 and back, and a drag of the row changes the order, exactly as for IK. The filter chip Path shows only path constraints.
Position and Spacing#
Position is the distance of the first bone from the start of the path. The two buttons choose the mode. In Percent mode, which is the default, the value is a share of the whole length of the path, shown as 0% or 50%. In Fixed mode it is a distance in pixels along the curve. Changing the value in time slides the bones along the track, so Position is the main thing to animate.
Spacing is the distance between neighbouring bones and has four modes. Length adds the value to the length of each bone, so with 0 the bones touch end to end, like a chain of links; this is the default. Fixed gives the gap in pixels between the starting points of the bones and ignores their length. Percent gives the gap as a share of the path length. Prop. (proportional) spaces the bones in proportion to their own lengths and scales the whole chain by the value. A bone with a length of 0 is spaced by the value of Spacing itself in the Length and Prop. modes.
On a closed path, a chain that runs past the end wraps around to the start. Use the Closed and Constant speed switches of the path (see Path) when Position has to move the bones at an even speed.
Rotate modes and Offset#
The Rotate row chooses how the bones are turned. In Tangent, each bone looks along the curve at the point where it stands. This suits a train: every car follows the direction of its own piece of rail. In Chain, each bone points at the next bone of the chain and the chain bends like a rope along the curve. Chain scale does the same and also stretches each bone along its length so that it reaches the next one exactly, which makes a body that grows and shrinks along the track.
Offset adds degrees to the angle that the mode gives. With 90 a bone drawn vertically can be laid along the track, and with 180 it turns around.
Mixes#
The Mix slider is the rotation mix and goes from 0 to 100%. Mix XY has two chips, X and Y, and a click on a chip asks the value in percent. The three values blend the result with the pose that the bone would have without the constraint: at 100% the bone takes the position and the rotation from the path completely, at 0% the channel is left alone. A path constraint has no mix for scale or shear; scale only changes in the Chain scale mode.
Set X and Y to 100% and Mix to 0 for a bone that must slide along the path without turning. The Link sliders button in Properties copies the rotation mix into the two translation mixes. In Properties the same values appear as Rotate (with the rotate mode), and Translate with its two sliders.
Animating a path constraint#
In Animate the detail has a Keys row with three chips: Position, Spacing and Mix. A chip writes the value that is shown now at the playhead, as an absolute value, and the status line reports the key. The three mixes live in one key, so Mix writes all of them. Setup values are not touched, and the keys are edited like any other, see Keys. Keying stops playback, so set the playhead first.
A typical animation is two keys on Position: 0% at the first frame and 100% at the last, with a closed path, so the bones go once around the track. Keying Mix to 0 releases the bones from the path, for example when a train leaves the track. The demo scene docs/examples/path/train.ligamen shows both: a four-car train goes round a closed track in the ride clip and leaves it for a siding in the derail clip.
Path constraints and skins#
A path constraint can belong to a skin. Turn on Skin required in the Skin row and the constraint runs only while a skin that lists it, or default, is on. Add a constraint to a skin with Skin Membership in the Tree, as described in Skins. The same row exists in the Properties card of the constraint. All settings are kept in .ligamen, in Spine JSON and in the binary skeleton as they are.