Optionaloptions: LookAtConstraintOptionsThe node this component is attached to, or null. Written by the
ComponentRegistry alone (§6a); never assign it.
ReadonlymaxLargest turn rate in rad/s, or undefined for an unlimited snap.
Steps on which the aim was degenerate and the rotation was left untouched.
Not incremented by a §42 refusal — see the module note on why the two states are kept apart — and not by an idle constraint.
What the node aims at, or null for an idle constraint — one that writes
nothing, and therefore raises no §42 conflict on a node it does not own.
ReadonlyupReference up direction, in world space. The rig's own copy, written in
place; a (0, 0, 0) or non-finite value is not refused here but makes every
step a skipped one, exactly as an aim parallel to it does.
Static ReadonlytypeComponent key (plan D2) and §79 serialization name.
Aims node at the target. Called by ConstraintSystem once per fixed
step, after the §42 authority check and after the placement components.
the node being aimed
the fixed step, in seconds (§7a)
true when the rotation was written. false — and a bumped
LookAtConstraint.skippedSteps — when the target's world position is
not finite, coincides with the node's own, or leaves the roll undetermined;
an idle constraint returns false without counting a skip.
§12's look-at constraint: a component that turns its node's
−Zaxis towards a target every fixed step, optionally rate-limited.The aim itself is
Node.lookAt— the same primitive an application calls, so a constrained camera and a hand-aimed one agree exactly (R-36). What this component adds is the three things a per-step aim needs and a one-off call does not: a target that may be a moving node, a survivable answer to the degenerate configurationslookAtrefuses, and a slew limit.The slew limit
With
maxAngularSpeedset, the node turns towards the aim at no more than that many radians per second, along the shortest arc (Quaternion.slerp's rule), and never overshoots: a rig that isθradians off arrives inθ / maxAngularSpeedseconds and stops there, because the goal is recomputed from the target every step rather than integrated.It is implemented by writing the rotation twice on a limited step — once by
lookAt, which lands on the goal, then once by slerping back from the rotation captured before the call. That is deliberate. The alternative is a second copy oflookAt's world-rotation-to-local-rotation division, which is the one piece of that method with a real subtlety in it (the parent's world rotation, recovered by decomposition), and two copies of it would be two things to keep in agreement. Two writes cost one extraTransform.versionbump on a step that was already recomputing a world matrix.