AnimationConstraint
Aligns two BaseParts with an animate-able kinematic or force-based joint.
| Memory category | BaseParts |
|---|
Member index 12
Description
An AnimationConstraint constrains its Attachments so that
they're offset by Transform.
For backwards compatibility with Motor6D, AnimationConstraint
exposes read-only C0, C1, Part0, and Part1 properties to help adopt
the AvatarJointUpgrade.
History 39
- 726 Change Default of Transform from CFrame(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) to
- 726 Change Default of from to
- 726 Change Default of from to
- 726 Change Default of MaxTorque from 10000 to
- 726 Change Default of MaxForce from 10000 to
- 726 Change Default of LinearStrength from 1 to
- 726 Change Default of LinearDamping from 1 to
- 726 Change Default of IsKinematic from false to
- 726 Change Default of from CFrame(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) to
- 726 Change Default of from CFrame(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) to
- 726 Change Default of AngularStrength from 1 to
- 726 Change Default of AngularDamping from 1 to
- 723 Add LinearStrength
- 723 Add LinearDamping
- 723 Add AngularStrength
- 723 Add AngularDamping
- 706 Change Tags of AnimationConstraint from [NotBrowsable] to []
- 705 Change Default of Transform from to CFrame(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- 705 Change Default of from to CFrame(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- 705 Change Default of from to CFrame(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- 705 Change Default of Transform from CFrame(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) to
- 705 Change Default of from CFrame(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) to
- 705 Change Default of from CFrame(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) to
- 702 Change Default of Transform from to CFrame(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- 702 Change Default of from to CFrame(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- 702 Change Default of from to CFrame(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- 693 Change MemoryCategory of AnimationConstraint from PhysicsParts to BaseParts
- 594 Add
- 594 Add
- 594 Add
- 594 Add
- 569 Add IsKinematic
- 553 Change Default of Transform from to
- 553 Change Default of MaxTorque from to 10000
- 553 Change Default of MaxForce from to 10000
- 549 Add Transform
- 549 Add MaxTorque
- 549 Add MaxForce
- 549 Add AnimationConstraint
Members 12
AngularDamping
| Type | Default | |
|---|---|---|
| float | ||
The damping ratio (ζ) applied to the rotational part of the constraint.
Only used if IsKinematic is
false.
A value of 1 corresponds to critical damping, where the constraint
reaches its target orientation as fast as possible without overshoot in
the absence of other forces or constraints. Values less than 1 are
under-damped and oscillate around the target before settling. Values
greater than 1 are over-damped and approach the target more slowly
without oscillation. A value of 0 applies no angular damping, causing
the constraint to oscillate.
Even with this property set to 1, an AnimationConstraint at the root
of a multi-body mechanism may still exhibit low-frequency oscillation
because it does not "see" the full effective mass of the downstream chain.
You can compensate by increasing both
AngularStrength and
AngularDamping beyond their defaults.
| Thread safety | ReadSafe |
|---|---|
| Category | Compliance |
| Loaded/Saved | true |
History 2
- 726 Change Default of AngularDamping from 1 to
- 723 Add AngularDamping
AngularStrength
| Type | Default | |
|---|---|---|
| float | ||
Controls how rigidly the constraint enforces the rotational part of its
target Transform. Only used if
IsKinematic is false. The
resulting torque is capped by
MaxTorque.
AngularStrength is defined as a normalized natural frequency,
AngularStrength = f / 60, where f is the target natural frequency in
Hz. The default value of 1 corresponds to a target frequency of 60 Hz
and produces strong tracking of the target orientation. A value of 0
applies no torque. Values less than 1 produce a softer, more compliant
rotational response, and values greater than 1 produce a stiffer
response.
Use values significantly greater than 1 with caution, as they may cause
the simulation to become unstable.
| Thread safety | ReadSafe |
|---|---|
| Category | Compliance |
| Loaded/Saved | true |
History 2
- 726 Change Default of AngularStrength from 1 to
- 723 Add AngularStrength
IsKinematic
| Type | Default | |
|---|---|---|
| bool | ||
When true, the connected parts follow the
Transform perfectly without
participating in physics simulation. When false, the connected parts
follow the trajectory using forces and torques limited by
MaxForce and
MaxTorque.
| Thread safety | ReadSafe |
|---|---|
| Category | Data |
| Loaded/Saved | true |
History 2
- 726 Change Default of IsKinematic from false to
- 569 Add IsKinematic
LinearDamping
| Type | Default | |
|---|---|---|
| float | ||
The damping ratio (ζ) applied to the translational part of the constraint.
Only used if IsKinematic is
false.
A value of 1 corresponds to critical damping, where the constraint
reaches its target position as fast as possible without overshoot in the
absence of other forces or constraints. Values less than 1 are
under-damped and oscillate around the target before settling. Values
greater than 1 are over-damped and approach the target more slowly
without oscillation. A value of 0 applies no linear damping, causing the
constraint to oscillate.
LinearDamping has no effect when
LinearStrength is 0.
| Thread safety | ReadSafe |
|---|---|
| Category | Compliance |
| Loaded/Saved | true |
History 2
- 726 Change Default of LinearDamping from 1 to
- 723 Add LinearDamping
LinearStrength
| Type | Default | |
|---|---|---|
| float | ||
Controls how rigidly the constraint enforces the translational part of its
target Transform. Only used if
IsKinematic is false. The
resulting force is capped by
MaxForce.
LinearStrength uses the same normalized natural frequency definition as
AngularStrength,
LinearStrength = f / 60, where f is the target natural frequency in
Hz. The default value of 1 corresponds to a target frequency of 60 Hz
and produces strong tracking of the target position. A value of 0
applies no force. Values less than 1 produce a softer, more compliant
positional response, and values greater than 1 produce a stiffer
response.
Splitting angular and linear parameters lets you make orientation tracking
stiff while keeping positional tracking soft, or vice-versa. As with
AngularStrength, use values
significantly greater than 1 with caution, as they may cause the
simulation to become unstable.
| Thread safety | ReadSafe |
|---|---|
| Category | Compliance |
| Loaded/Saved | true |
History 2
- 726 Change Default of LinearStrength from 1 to
- 723 Add LinearStrength
MaxForce
| Type | Default | |
|---|---|---|
| float | ||
Maximum force magnitude the constraint can apply to achieve its goal. Only
used if IsKinematic is false.
| Thread safety | ReadSafe |
|---|---|
| Category | Compliance |
| Loaded/Saved | true |
MaxTorque
| Type | Default | |
|---|---|---|
| float | ||
Maximum torque the constraint can use to reach its goal. Only used if
IsKinematic is false.
| Thread safety | ReadSafe |
|---|---|
| Category | Compliance |
| Loaded/Saved | true |
Transform
| Type | Default | |
|---|---|---|
| CFrame | ||
The internal CFrame that is manipulated when the constraint is being animated.
Note that AnimationConstraint transforms are not applied immediately,
but rather as a batch in a parallel job after
RunService.PreSimulation, immediately before physics steps. The
deferred batch update is much more efficient than many immediate updates.
If the AnimationConstraint is part of an animated model with an
Animator, then Transform is
usually overwritten every frame by the Animator after
RunService.PreAnimation and before
RunService.PreSimulation.
| Thread safety | ReadSafe |
|---|---|
| Category | Data |
| Loaded/Saved | true |
History 6
- 726 Change Default of Transform from CFrame(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) to
- 705 Change Default of Transform from to CFrame(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- 705 Change Default of Transform from CFrame(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) to
- 702 Change Default of Transform from to CFrame(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- 553 Change Default of Transform from to
- 549 Add Transform