Question:
Currently, I am developing a first-person maze game using Threejs. I recently integrated DeviceOrientationControls to transition the game towards VR. However, I have encountered an issue where my previous camera movement system, which used arrow keys, is no longer functional as the camera is now separated from it.
How can I regain camera movement control using arrow keys while still updating the camera with DeviceOrientationControls?If possible, how can I automate forward movement based on the camera's perspective?
Update:
Alex Fallenstedt discovered a suitable example that aligns with my requirements.
Nevertheless, I have a few inquiries;
- What method does the script use to move the camera?
- How can I streamline or incorporate this functionality into my project?
Resources:
How to control camera both with keyboard and mouse - three.js
Detecting arrow key presses in JavaScript
How to move camera along a simple path
How to control camera movement with up, down, left, right keys on the keyboard
Comparison:
View the game's previous behavior (with functioning controls)
See how it currently operates with VR integration
Note: I have omitted my script as I believe it may not be necessary for this inquiry. Should you require it, kindly request and I will provide it.