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
- Look Dev errors are spammed when opening a new HDRP project when Look Dev was added to the layout in the previous project
- URP Scene Templates are not editable when first opened from the New Scene dialog
- Look Dev window flickers when resizing the window after docking it
- UI breaks when Multiplayer Center window section divider is moved too far
- Adaptive Performance documentation link leads to outdated package documentation when the documentation hyperlink is pressed in the Project Settings window
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.