Commit d921a7c
authored
Fix applyTorque world matrix mismatch (#3561)
`PhysObj:ApplyTorqueCenter` expects input multiplied by `q_world_f_core_last_psi`, but `PhysObj:LocalToWorldVector` multiplies input by a matrix interpolated between `q_world_f_core_last_psi` and `q_world_f_core_next_psi`.
`AddAngleVelocity` expects local space input which matches the Wiremod `applyTorque` input. We only need to convert torque to velocity dividing it by `rot_inertia`.1 parent 8159c5f commit d921a7c
1 file changed
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
737 | 737 | | |
738 | 738 | | |
739 | 739 | | |
740 | | - | |
741 | | - | |
742 | | - | |
743 | | - | |
| 740 | + | |
| 741 | + | |
744 | 742 | | |
745 | 743 | | |
746 | 744 | | |
| |||
0 commit comments