Search Issue Tracker
By Design
Votes
0
Found in
2018.4
2019.4
2020.3
2020.3.8f1
2021.1
2021.2
Issue ID
1337722
Regression
No
Relative Torque does not apply relative to the Rigidbody's axis when the Box Collider is a child of the RigidBody
Reproduction steps:
1. Open project "case_1337722"
2. Open Scene "SampleScene"
3. Enter Play Mode
4. In the Hierarchy tab select GameObject "GameObject (1)"
5. Observe Scene view
Expected result: Object with RigidBody Component rotates around the Y-Axis
Actual result: Object with RigidBody Component doesn't rotate around the Y-Axis
Reproducible with: 2018.4.35f1, 2019.4.27f1, 2020.3.10f1, 2021.1.9f1, 2021.2.0a17
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note:
The AddRelativeTorque function takes into account the rotation of the Rigidbody/ArticulationBody and doesn't have to do to anything with this issue. AddTorque produces the same results in cases where the Rigidbody is not rotated, only the child Collider is.
The reason why the torque gets applied along multiple axes is the Inertia Tensor. When PhysX multiplies the torque that has been provided with the global inverse inertia tensor matrix, the resulting angular acceleration has non-zero components around multiples axes. This can also be seen by using ForceModes that don't take Inertia Tensor into account like ForceMode.Acceleration or ForceMode.VelocityChange.