# Articulation Bodies appear to be broken with 0 damping?

Either I’m missing something obvious (which I find more likely), or articulation bodies are fundamentally broken.

Use case:
We are simulating robotics in space, so articulation bodies sound appealing, but they fail even the most elementary tests.

Specifically, suppose you have an object with a non-uniform (!(x==y==z)) tensor and try to apply torque on more than one axis. In that case, the simulation breaks apart as the object starts to accelerate endlessly. Damping can counter this, of course, but this is very iffy since we need high precision.

The easiest way to reproduce this is to create two cubes:

1. Immovable cube that acts as a root.
2. Add a child cube scaled on one axis (to modify the tensor) and has 0 damping.
• Attach it at an angle with a spherical joint, so it starts swinging on more than one axis.

With 0 damping/friction, I’d expect the swinging to stabilize. Instead, it keeps accelerating until one of the values reach angular velocity limits (way more evident after increasing the limit in project settings):

We observed similar behaviour when adding a free-floating (no gravity, no damping) and briefly applying torque on two axes. Instead of just spinning in place, it keeps accelerating and eventually flies offscreen.

1 Like

Is not good becuse presition is low. For performance
Esperiment with adding more presition for the RB. This will be less perfomant but more accurate.
Play with RB options

“Interpolation” allows you to smooth out the effect of running physics at a fixed frame rate.

In the joint
For example actually Collition is discret. What happened if you add other option?

Also too little or too much mass has destructive consecuences.

CONCLUTION
Play with “Collision Detection” and “Interpolate”

Spherical joints are a well of problems that keeps on giving. Currently, they suffer from issues like what you have seen, cases where it should work, reach a balance, end up springing out of control with no apparent reason. And this instability comes from within PhysX itself. What we recommend in these situations is to use multiple Revolute joints per axis instead of a single spherical joint. This should vastly increase stability, albeit it requires a little more setup

1 Like

If it was just the joints, we could work around it, but the issue appears to be the articulation body itself.

Take a simple cube scaled to 1:1:5 (to get uneven tensors), disable gravity/damping, apply some velocity or torque on two axes and it starts accelerating:

Test script:

``````using UnityEngine;

public class ArticulationTest : MonoBehaviour {
[SerializeField] private float angularVelocity;
[SerializeField] private bool applyAsTorque;

private ArticulationBody _body;

private void Start() {
_body = GetComponent<ArticulationBody>();

// same behaviour with lower limit/values, just less obvious.
_body.maxAngularVelocity = 20;

if (applyAsTorque)
else
_body.angularVelocity = new Vector3(0, 3, 3);
}

private void Update() => angularVelocity = _body.angularVelocity.magnitude;
}
``````

Hmm, could you report a bug on this and attach the repro project? We’ll take a deeper look at it then.

Thanks for taking the time to notify us!

Done.
(Attaching the repro project here too, just in case anyone else wants to poke around at some point.)

1 Like

Damping also seems to be broken, I have a game object with has linear and angular damping. When starting the game the damping is basically non existent, if I change these values in the editor by let’s say 0.01%, then they start affecting the game object behavior, as if there was no damping before this change.

1 Like