[Solved] Apply Torque Local Angle


#1

How to add torque to the local rotation of a entity?

This is global:

WheelRigidbody.ApplyTorque(Vector3.UnitX * 10);

This does not work correctly:

WheelRigidbody.ApplyTorque(Vector3.Normalize(WheelEntity.Transform.Rotation.Axis) * 10);

Maybe add 90 degrees. … I can’t solve it.

Background: Car physics.


#2

Solution:

rigidBody.ApplyTorque( Entity.Transform.LocalMatrix.Left * 10);

btw. 10 is just the strength of the force.