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
- [OpenGLES][XR] Zooming in on the camera's URP opaque texture causes "double vision" on Quest in OpenGLES3
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
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.