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
- Objects with Universal Render Pipeline/Particles/Lit shader are always lit up when changing their Rendering Layer Mask
- PolySpatial “Trying to set shader on a Material Variant.” error is printed in the console when entering Play Mode
- Error “Shader error in 'YSCloudCover': call to 'tex3D' is ambiguous at Assets/YSCloudCoverText.shader(606) (on d3d11)“ is present when compiling tex3D shader with DXC
- Placeholder asset is not loaded with Advertisement Legacy sample when using the latest version of the package
- Addressables content build fails but the Player build is successful when building a development build
Add comment