If I setup a universal camera with the keyboard inputs shown below and just point it horizontally it moves as I would like, that is only in the (forward, backward, left and right) horizontal directions. However, when I point the camera at any other beta angle, then the plane that the keysUp and keysDown keys move the camera in becomes relative to the way the camera is facing (I’ve tried camera.cameraDirection, camera.cameraRotation and camera.rotation but they all do the same thing). That is, the vertical height of the camera changes too. Is there a way to apply a beta angle (tilt) to the camera but for the keysUp/Down keys to only move the camera in the forward/backward horizontal directions?
I played with that Playground example a lot earlier, but I think its over complicated for what I need. I won’t have a character moving around, I just need the camera to move horizontally and not vertically (I may have a separate button deal with the cameras vertical position, but I don’t want the arrows to do this).
At first it looked like that was working, but when I place some stuff much further in the z direction and move towards it, I can see that the y continues to reduce (albeit much less than before). Playground below to demonstrate. https://playground.babylonjs.com/#PZ3GJU#1
Is there a way to reset the y on each render? (as my y will be a known value)
A note of caution re line 14, properties starting with an underscore are private and although unlikely to be changed it is not guarenteed that they will always work.