Currently, I am working on a webVR application using Three.js. I have successfully integrated DeviceOrientationControls, but now I am looking for a way to navigate the virtual environment using the magnet button on the google cardboard.
My goal is to have the camera move in the direction I am facing with a single click of the magnet button, and stop the motion with another click.
Is this functionality achievable? If so, I would appreciate any guidance on how to implement it as I am struggling with this task. I understand that the magnet button triggers a "click" event, but I am unsure how to translate this into camera movement in the desired direction.
Thank you in advance for any assistance.