So i had added a first person control in my project. The person can walk freely inside the room, but i am having problem, that mouse movements are not restricted. like i dont want the person to see upside down.
How can i apply the mouse to show correct first person view
link to the project
You can clamp the angle set on the X axis like this to a min/max values (if you are using the code found in the First Person Movement tutorial):
const angle = pc.math.clamp(this.eulers.y, -45, 45);
this.camera.setLocalEulerAngles(angle, this.eulers.x, 0);
thanks a lot Leonidas, you are really helpful when i am stuck in some logic