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
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
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
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.