hi , I have a physics imposter i want I to move according to my inputs , so I want to freeze its x, y,z rotation (similar to what you do for rigidbody in unity ).
cc @Cedric
impostor.setAngularVelocity(BABYLON.Vector3.Zero())
With ammojs, you can call setAngularFactor
on the ammojs body. a value of 0 mean rotations are frozen.
something like:
mymesh.physicsImpostor._physicsBody.setAngularFactor(new Ammo.btVector3(0,0,0));
2 Likes