Search Issue Tracker
By Design
Votes
4
Found in
2019.4
2020.3.5f1
2020.3.10f1
2021.2
2022.1
2022.2
Issue ID
1388024
Regression
Yes
Hinge joints don't stabilize when its Connected Body was moved
Reproduction steps:
1. Open attached project "Repro"
2. Open "SampleScene" Scene in the Scenes folder
3. Enter Play Mode
Expected result: after 2 seconds "yoke" GameObject is not moving
Actual result: after 2 seconds "yoke" GameObject is moving
Reproducible with: 2019.4.34f1, 2020.3.10f1, 2020.3.26f1, 2021.2.8f1, 2022.1.0b4, 2022.2.0a2
Not reproducible with: 2020.1.0a1, 2020.3.9f1
Comments (3)
-
welinkgro
Apr 09, 2022 07:55
Thanks for share.
-
AndersMalmgren
Jan 19, 2022 14:56
-
AndersMalmgren
Jan 19, 2022 14:54
Here you can see video of problem 2020.3.5 stable vs 2020.3.24 unstable
https://issuetracker.unity3d.com/product/unity/issues/guid/1388024
Thanks
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:
The behavior is as expected. Let's imagine the following GameObject hierarchy:
root (Rigidbody)
-> nodeA (Collider)
-> nodeB (Empty GameObject)
-> leafB (Collider)
The Rigidbody designated as 'root' will have it's center of mass and inertia tensor computed based on the shapes which influence it, namely 'nodeA' and 'leafB'. Removing either of these shapes will cause the Rigidbody to have said properties recalculated.
Now if we do the following change to the hierarchy:
root (Rigidbody)
-> nodeA (Collider)
-> nodeB (Rigidbody)
-> leafB (Collider)
The Rigidbody designated by 'nodeB' is now taking over the shape provided by Collider 'leafB', this will detach the shape from Rigidbody 'root'(which will cause a recalculation of center of mass and inertia tensor). Previously there was an issue (https://issuetracker.unity3d.com/issues/inertia-tensor-is-not-reset-when-a-collider-is-removed) which would cause center of mass and inertia tensor to not be recalculated when detaching a shape (by removing the Collider component for example), prior to said issue being resolved the Rigidbody 'root' from our example would keep it's properties intact as we wouldn't recalculate them (which was definitely wrong).
In order to still satisfy the behavior this issue refers to, a simple solution would be to cache the center of mass and inertia tensor of the 'root' Rigidbody (using the example above as reference) before adding the new Rigidbody to 'nodeB' and setting it back afterwards.