Search Issue Tracker

Won't Fix

Votes

4

Found in

2019.4

2019.4.0f1

2020.3

2021.2

2022.1

2022.2

Issue ID

1365418

Regression

No

Glitchy behaviour on Assets when using Hinge Joint Component

Physics

-

Reproduction steps:
1. Open the project "Hinge_Joint_Repro"
2. Open "Assets/Tutorials/Train Controller - Tutorial_01" scene
3. Enter Play Mode
4. Select the children of GameObject "Physics Train - Joint Issue" from the Hierarchy
5. Disable and re-enable them

Expected result: Both GameObjects are re-enabled with no issues
Actual result: GameObject "PlatformWagon_Black_13_4" changes positions and starts rotating

Reproducible with: 2019.4.36f1, 2020.3.28f1, 2021.2.10f1, 2022.1.0b4, 2022.2.0a4

Note:
- issue reproduction setup is not consistent, it reproduces quite randomly

  1. Resolution Note:

    So the behaviour is seen due to hinge joints getting enabled and setting up their axis information on a rigidbody that may be disabled. This results in the hinge joint attaching itself to the world, as if the rigidbody was not set. The problem arises that when the Rigidbody eventually gets enabled, there is no callback, because a Rigidbody does not store any reference to joints that might have it defined as a connected body, so there is no callback for the Hinge joint to update its axis information. A very simple fix in this case is to just make sure the Hinge joint gets enabled AFTER the rigidbody is already active OR disable/reenable it again once the Rigidbody is active. Fixing this bug would require us to add a lot of cross links between rigid bodies and articulation bodies with joints, which has a high risk of introducing more issues. Since this bug has an easy workaround we will not be fixing it as of now.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.