0
Unity Bug

Joints Behave Strangely

Dave Lynam 3 years ago updated by Lazlo Bonin (Lead Developer) 2 years ago 2

Hello,

I wanted to contact you regarding the behavior of Unity Joint components attached to a gameobject with a Timeline component. It seems as though joints are applying force to a rigidbody that is outside the control of a Timeline. The behavior I see is rigidbodies with joints moving despite being at zero timescale. They move slower, likely as a result of the forces they exert on the rigidbodies they link to being adjusted by Chronos, but they still move, and as time speeds back up, the forces they exert seem to compound more than they should even at a 100% timescale.

You can reproduce this effect with the following method:

  1. Create a new scene
  2. Set up a chronos timekeeper with a global clock.
  3. Add an object with a kinematic rigidbody.
  4. Add another object with a non-kinematic rigidbody.
  5. Position this second object just underneath the first.
  6. Add a spring joint to the second object and set its connected body to the first.
  7. Add a timeline to the second object and set its clock to the global clock.
  8. Play the scene and change the time scale of the global clock around to observe the results.
I'm extremely interested in helping you address this issue. Please let me know how I can help.
Chronos Version:
2.4.6
Unity Version:
5.5
Pending Review

Hi Dave,

As we discussed by email, the main underlying issue here is that Chronos does not affect joints. Unfortunately, I can't find any point in the public physics API to hook the time scale variable. I could adjust the break force and torque, but this wouldn't change the overall sensibility.

At time scales of zero and under, rigidbodies are made kinematic behind the scenes. Therefore, it seems weird to me that 2 kinematic rigidbodies would somehow move due to physics. Note that Unity documentation states that you should not parent objects with rigidbodies (see this question). Does the same bug occur if you don't parent the objects?