I am making a 3D FPS game using Three.js and Ammo.js, however I am running into the issue of the player Ammo object just falling over and not being able to clamp it so that the Ammo object can only rotate on the Y-Axis
I tried adding
const physicsBody = this.playerEntity.player.userData.physicsBody
physicsBody.setAngularVelocity(new Ammo.btVector3(0.0, 1, 0.0))
in the animation loop, however this just makes the player rotate in a circle and doesn't clamp the X and Z rotation at all
Any tips or advice would be majorly appreciated