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
- Fixing Message Loss in UMPE During Domain Reload
- The Editor freezes when ScheduleReadOnly of IJobParallelForTransform with dependency is used
- Text is truncated in the Inspector when the display scale is set to 150%
- CancellationTokenSource(<timeout>) has incorrect cancellation status when used in WebGL Player
- VFX property value names are cut off when properties with 'Arc' are viewed in the VFX Blackboard
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.