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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
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.