Search Issue Tracker
By Design
Votes
0
Found in
2017.3.0f3
Issue ID
1036106
Regression
No
Rigidbody constrains do not work if the rigidbody has a child with a collider
To reproduce:
1. Open the project, attached by the user (ConstraintsTest.zip)
2. Open the "testscene" scene
3. Select the ItemLaser game object in the Hierarchy
4. Observe that it has Freeze Rotation X and Y set to true
5. Enter Play mode
6. Observe that the object still rotates around the frozen axes
7. (Optional) Disable the ItemLaser -> Laser object
8. In Play mode, observe that the constraints now have effect on the rigidbody
Expected: constraints have effect on the rigidbody no matter what
Reproduced in 2017.1.3p4, 2017.2.2p4, 2017.3.0f3, 2017.4.2f2, 2018.1.0f2, 2018.2.0b4, 2018.3.0a1
By design: FreezeRotation applies constraints in rigid body's local mass frame, which is not necessarily aligned with world frame. The project has a rigid body with 2 colliders. the second one (capsule) is off centre. This result in a local mass frame that has a non identity rotation w.r.t world frame.
To make things work as expected, try setting Rigidbody.inertiaTensorRotation to identity as showed in this page https://docs.unity3d.com/ScriptReference/Rigidbody-inertiaTensorRotation.html
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Mobile] Developer Console does not appear when an error is thrown
- [HDRP] Game view renders artifacts when Camera's Component "Post Anti-aliasing" is set to "TAA" and Dynamic Resolution's "Forced Screen Percentage" is changed
- A deactivated Prefab's name color becomes white when a GameObject in the scene is deactivated
- The Game view becomes blank when using Frame Debugger with MSAA and Texture binding enabled in Play Mode
- NullReferenceException is thrown when changing the Inspector preview selection
Add comment