I am trying the add first person controls to my world and want to basically have the WASD keys act like the Arrow keys, but also would like to have the camera's rotation lock onto the mouse so that when the mouse moves upward the camera looks up, etc. I researched and found this post
But unfortunately nothing was resolved.
Question
What property of the camera controls its movement relative to its current position? What I mean is if I want to move the camera forward relative to w
Hi,
I did not managed to get your playground working, but here are my ideas :
If you want to move the camera relative to pointer location, you can use engine.isPointerLock = true. This will lock the pointer and every mouse move will act on the camera. In my opinion this method is better than applying rotation with A and D keys.
If you want to move forward after rotating the camera with the mouse, you have to compute how much you will move along X and Z axis. Here is how I