<sk-follow-constraint>

← prev index next →

Makes one node mirror another's live property values, optionally remapped — the way to link objects so they move together without parenting them.

Remarks

This is the property-following member of the Constraint family: like every constraint it drives its constrained target by recomputing from live scene state each frame — here that state is another SkenraAnimatable's current property values, so the target keeps tracking the source even as the source animates. The link crosses types freely: a light's intensity can drive a node's scale.

Key attributes. source names the animatable to read, by #id. Two ways to choose what to copy: properties follows same-named properties one-to-one (source.x → target.x), while mappings follows one property onto a different one with an optional value transform — a source property, a target property, and a remap of the value between them. Use properties to lock nodes together and mappings to translate between different quantities. As with all constraints, priority and composite govern how it stacks with other effects on the same property.

Related. Other members of the Constraint family drive position/orientation (sk-align-to-spline-constraint, sk-target-at-constraint, sk-orbit-constraint); sk-field-constraint writes a field's sampled weight instead of another animatable's property; the GPU-parallel PointConstraint applies per-clone effects across a Cloner.

Serve these docs to run the live example. WebGPU needs a secure context — open this page via grunt serve rather than double-clicking the file. The Markup tab works from disk.

Attributes

AttributeTypeDefaultDescription
sourceanimatable <id-ref> The Animatable whose properties will be followed, as a reference by id
properties <string-list> (<string>[,<string>]*) Simple same-name properties to follow from the source.
mappings <property-mapping> Property mappings with optional value transforms.
priority <number> Priority for effect ordering.
composite <constraint-composite> ("replace" | "add" | "accumulate") Composite operation for this constraint.