How can you rotate a rigid body in ammo js?

I can’t rotate a rigid body in ammo js I put a MeshImpostor and defined everything and froze the x and z axis but I need to make the y axis rotate-able. I’ve tried freezing the y-axis by setting the angular velocity to 0 and it works but still cant set the y axis. Or if there is a function where I could smoothly change the y axis with setAngularVelocity like the lerpAngle function I would appreciate it.

Wait I might’ve found a solution by using object.rotationQuaternion. Because the physics use quaternions I think I might’ve found something

1 Like

yeah quaternions were the answer. I just used Euler angles help me on it like normal object.rotations.

1 Like