Rigby2DDocs

Rigging

Constraints

Constraints move bones for you. Rigby2D has five kinds, all evaluated by the editor and by every runtime:

ConstraintDoesTypical use
IKBends a chain of one or two bones so its tip reaches a target bone.Arms reaching, feet planted on the ground.
TransformCopies (or adds) a source bone's rotation, position, scale or shear to other bones.Gears, mirrored parts, a jaw following a chin control.
PathPlaces and rotates bones along a path attachment.Tails, ropes, tentacles, objects following a track.
PhysicsSimulates springy follow-through on bones.Hair, braids, earrings, cloth, antennae.
SliderPlays an animation at a time set by a value or by a bone.Facial rigs, dials, a bone that "scrubs" a pose.

#Creating a constraint

  1. In Setup mode, select the bones as the constraint needs them (below).
  2. In the tree's Constraints section, press + and choose the kind.
  3. Adjust the settings in the inspector.

Every constraint has a Name, a Mix (how much it applies, 0 to 1), an Order (Apply earlier / Apply later: constraints apply one after another) and Skin required (active only when the current skin includes it; see Skins).

In Animate mode, selecting a constraint shows its keyable values instead (mixes, IK bend, path position and spacing, physics strength and wind, slider time) with ◆ key buttons. Keys appear in the dopesheet.

#IK

Select 1 or 2 bones for the chain, then optionally the target bone, and create an IK constraint. With no target selected, a new bone is added at the tip of the chain to act as the target. Move the target and the chain follows.

The IK constraint settings for NILA's right arm
IK constraint ik_hand_r: the chain upperarm_r → forearm_r reaching for its target

SettingMeaning
BonesThe chain (1 or 2 bones). Use selected bones as chain replaces it with the selection.
TargetThe bone the chain reaches for.
Mix0 = the animated pose, 1 = fully solved by IK.
SoftnessDistance before full reach where the chain starts slowing, so a straightening arm or leg does not snap.
BendThe direction the middle joint bends. Flip it if an elbow or knee bends the wrong way.
CompressScale the bones down when the target is closer than their length.
StretchScale the bones up when the target is farther than their length.
UniformCompress and stretch scale both axes.

Tip

For walk cycles, key the foot targets, not the leg bones: feet stay planted while the hips move. AutoRig adds IK targets (ik_foot_l, ik_hand_r, …) for every two-bone limb.

#Transform

Select the bones to constrain, then the source bone last.

SettingMeaning
Bones, SourceThe constrained bones and the bone they read from.
Local sourceRead the source bone in its parent's space.
Local targetChange the constrained bones in their parent's space.
AdditiveAdd the source's values instead of matching them.
ClampLimit mapped values to each mapping's range.
PropertiesWhich of Rotate, X, Y, Scale X, Scale Y and Shear Y are copied, each with an Offset and a Mix.
Property mappingAdvanced: let one source property drive another target property (Source → target) with an Offset, Scale and Max. For example, the source's rotation can move the target along X.

Offsets from current pose sets the offsets so the constrained bone stays where it is now in the setup pose.

#Path

Add a path attachment first, or let the constraint make one: select the bones to place along the path and create a path constraint. A new path through the bones' origins and the last bone's tip is added.

SettingMeaning
Path slotThe slot whose path the bones follow.
PositionFixed (in world units) or Percent (of the path length), with Position value. Key the value to slide the bones along the path.
SpacingLength (each bone's length), Fixed, Percent or Proportional, with Spacing value.
RotateTangent (along the path), Chain (point at the next bone) or Chain scale (also stretch to reach it).
Rotation offsetAdded rotation.
Mix rotate, Mix X, Mix YHow much of the rotation and position the path controls.

#Physics

Select the bones that should move with physics and create a physics constraint. Each bone gets one. Physics adds motion the animation does not have: when the head turns, a braid swings past, overshoots and settles.

The physics settings of NILA's braid
braid1-physics: rotation follow-through on the first braid bone

SettingMeaning
BoneThe simulated bone.
Translate X, Translate Y, Rotate, Scale X, Shear XWhich motions are simulated, and how strongly (0 to 1). Braids and earrings usually only need Rotate.
LimitThe fastest speed the simulation lets a bone move, so fast animation cannot fling it away.
StepSimulation rate (60 fps by default).
InertiaHow much of the parent's motion the bone resists (0 to 1).
StrengthHow strongly it springs back to the animated pose.
DampingHow quickly the swinging dies down (0 to 1).
MassHeavier bones swing more slowly.
Wind, GravityConstant forces.
MixHow much of the simulation is applied.

Global next to a value makes it also follow skeleton-wide physics keys, so one key can change the wind or gravity for every physics constraint at once.

Physics runs while an animation plays (in the editor, in renders and in the runtimes) and restarts from the animated pose when playback starts. Renders simulate frame by frame from the start of the animation, so they are repeatable.

Note

Rigby2D's physics uses its own spring model driven by these settings, so the motion can differ slightly from other tools that read the same files.

#Slider

A slider plays an animation at a time you set. Create one when the project has an animation to drive.

SettingMeaning
AnimationThe animation it applies.
TimeWhere in the animation (seconds). Key it to scrub the animation from another animation.
MixHow much is applied.
LoopWrap the time around the animation's length.
AdditiveAdd the animation on top instead of replacing the pose.
BoneOptional: drive the time from a bone. With a bone set, Property (rotation, X, Y, scale or shear) times Scale gives the time; Local reads it in the parent bone's space.

For example, make an animation smile that goes from neutral (time 0) to a full smile (time 1), add a slider for it, and set Bone to a smile_ctrl bone with Y × 0.01: moving the control up 100 units smiles fully.

#Through the runtimes

The JavaScript and Rust runtimes evaluate all five constraint types with their keys. See Runtimes. Binary .skel export supports all of them; see Export.

Edit this page on GitHub