Interface: CCDIKLink
Defined in: src/components/anim/ik/CCDIK.ts:46
One link in an IK chain — bone reference plus optional joint constraints.
The chain is [root, ..., effector] (root→tip). The last link is the end-effector: its constraints are ignored because CCD never rotates the tip (the tip is dragged by its parent).
Two constraint families, applied in order each iteration after the bone's localQuat is updated:
Hinge (
hingeAxis+minAngle/maxAngle) Forces the joint to rotate ONLY aroundhingeAxis(in the bone's parent-local frame). Removes the swing component, keeps only twist around the axis, and clamps the twist angle to [minAngle, maxAngle]. Use this for the elbow / knee — anatomically a 1-DOF hinge that bends in one direction. Without it, CCD will solve "reverse-bent elbow" or "self-rotating forearm" poses that violate human anatomy.Per-axis Euler limit (
rotationMin/rotationMax) Clamps each Euler component of the bone's local rotation to a box. Use this for shoulders / hips — ball joints that have some freedom but can't bend backwards arbitrarily.Compatibility knobs:
eulerOrder(default'XYZ', the common IK-rig convention) — picks which Euler decomposition is used. Different orders give different "valid" boxes for the same quaternion.radians(defaultfalse) — values are degrees by default (Orillusion convention); settrueto interpret as radians (the common IK-rig convention, so external IK configs can be pasted in unchanged).
Hinge takes precedence: when hingeAxis is set, the Euler box is ignored (a 1-DOF hinge is already strictly less free than any 3-axis box).
Properties
boneName
boneName:
string
Defined in: src/components/anim/ik/CCDIK.ts:48
Bone name (must match a joint in the AnimatorComponent's avatar).
hingeAxis?
optionalhingeAxis?:Vector3
Defined in: src/components/anim/ik/CCDIK.ts:50
Bone-local hinge axis (unit vector) — forces 1-DOF rotation around this axis.
minAngle?
optionalminAngle?:number
Defined in: src/components/anim/ik/CCDIK.ts:52
Min twist angle around hingeAxis (radians). Required if hingeAxis is set.
maxAngle?
optionalmaxAngle?:number
Defined in: src/components/anim/ik/CCDIK.ts:54
Max twist angle around hingeAxis (radians). Required if hingeAxis is set.
rotationMin?
optionalrotationMin?:Vector3
Defined in: src/components/anim/ik/CCDIK.ts:56
Per-axis Euler lower bound applied to the bone's local rotation.
rotationMax?
optionalrotationMax?:Vector3
Defined in: src/components/anim/ik/CCDIK.ts:58
Per-axis Euler upper bound applied to the bone's local rotation.
eulerOrder?
optionaleulerOrder?:CCDIKEulerOrder
Defined in: src/components/anim/ik/CCDIK.ts:60
Euler order for rotationMin/rotationMax. Default 'XYZ' (common IK-rig convention).
radians?
optionalradians?:boolean
Defined in: src/components/anim/ik/CCDIK.ts:62
If true, rotationMin/rotationMax are radians (common IK-rig convention). Default false (degrees).

