In my ThreeJS setup, the camera is able to move through a 3D world and change its lookAt
multiple times while in motion. As a result, camera.getWorldDirection()
will always be more or less random.
Now, I require the camera to move specifically left, right, up, or down relative to camera.getWorldDirection()
. It's not as simple as using camera.position.x += 1
because this only works for a world direction of Vector3(0, 0, -1)
. If the world direction changes to something like (1, -1, 0)
, moving the camera to the right will require adjustments in both the X and Z axes.
I've explored quaternions and 4D matrices, but I'm struggling to understand them. I would greatly appreciate any assistance with this.
For a demonstration, visit: