How to use getDirection with applyImpulse(or applyForce)?

get direction is using world matrix. it’s updated before rendering in the chain of update during frame rendering.
if you change the rotation, you need to update the matrix like this:

another solution, without a matrix update is to get the quaternion and transform the vector directly like with this method:

https://doc.babylonjs.com/typedoc/classes/BABYLON.Vector3#applyRotationQuaternion