Improved AnimationConstraint: Stable, Mass-Independent Tracking for Physically-Simulated Joints
Key Takeaways
We’re releasing a 3-phase rollout of improvements to AnimationConstraint, giving you more control over how it drives Transform.
Test this on your game by setting Workspace.ImprovedAnimationConstraint = Enabled.
Hi Creators,
We’re rolling out a set of improvements to the AnimationConstraint that fix long-standing instabilities when physically simulated AnimationConstraints are used in chains or other complex mechanisms (e.g., the arm chain in physically-simulated characters). Because this changes the dynamics of any AnimationConstraint operating with IsKinematic = false, we’re releasing it via a standard 3-phase rollout (Workspace.ImprovedAnimationConstraint) so you can test and adapt your games.
We’re replacing the internal PD-controller-based response of AnimationConstraint (used when IsKinematic = false) with a constitutive soft-constraint formulation, and exposing four new properties that give you intuitive, mass-independent control over how firmly and smoothly the constraint drives its target Transform:
• AnimationConstraint.AngularStrength
• AnimationConstraint.AngularDamping
• AnimationConstraint.LinearStrength
• AnimationConstraint.LinearDamping
The Problem We’re Solving
The current AnimationConstraint uses an internal PD controller to drive its attachments toward the target Transform. This works well when a constraint is acting in isolation, but the controller can become unstable when applied to chains of parts connected by multiple constraints — the PD controller only “sees” the bodies directly connected to it, not the full effective mass of the downstream mechanism. This is the root cause of the instability some of you have hit when using AnimationConstraints to drive arm chains, robotic arms, doors, cranes, and similar articulated structures.
What’s Changing:
• The PD controller behind force-based AnimationConstraints is replaced w…