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
- [Android] Stage information is not logged when Log Shader Compilation is enabled
- [Vulkan] The memory allocation increases rapidly when there are multiple (three or more) Real-Time Reflection Probes in the Scene
- [macOS] Library folder of the opened project can be deleted which leads to the crash
- “Default Scene” dropdown field contains a spelling mistake “Default Builtin”
- Editor crashes on PPtr<Mesh> after adding Text Mesh and Cloth Components to the same GameObject
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.