I am making my own fps too!
object.rotationQuaternion.x = 0; and
object.rotationQuaternion.z = 0; in the register before render function.
object.rotationQuaternion.y = 0; would prevent the player from looking sideways.
But that might be an issue, as I use 2 spheres and a cylinder to make a capsule, and a custom movement function. Also, good luck finding a solution to slopes! aka “stair clipping”. One way is to turn off gravity when on slopes. My fps is going to be different from others just so I could avoid that issue. Can’t wait to see it come out!
You can announce it under the games/projects category on the forums!
Welcome to the community!
PS. Here is my playground for the fps: https://www.babylonjs-playground.com/#IFN77Q#52
I was stuck on looking left/right when stopped because I used .sleep when not moving to prevent sliding down slopes. I didn’t find a solution, but feel free to copy any code you like.
giv0.gitlab.io/fpsg (wait for the model city to load) was my first fps attempt. because it uses the default camera movement/gravity, jumping is not possible. Controls:
C toggle crouch
F toggle freecam
RIGHT CLICK aim
ctrl-u to see the code. click on the js file.