Ok, I will try and be as concise as possible. I am not very good with math and what might seem obvious to you will most likely be rocket science to me.
I am using Three.js w/CSS3DRenderer to create a virtual gallery space.
I need a first person perspective, like an FPS game.
I have gotten the camera to move forwards, backwards, left and right all successfully.
However, when I go to rotate the camera, I get the result
The camera is rotating its local axis, but what I need is for the viewport
, not the camera, to rotate, like
So what I need is for the camera to orbit around a pivot point/vector, and then refocus by using Object3d.lookAt()
I am aware that I can solve my problem by parenting the camera as a child of another object, and then rotating the axis of the object. However, I would rather do the math myself.
In short, I want to understand how to rotate one vector point around another, and how to represent that relationship mathematically.
I do not want to utilize a script, e.g., three.js pointer_lock controls, to get the job done. I want to get my hands dirty with the actual math.
Any advice or links to tutorials would be much appreciated!!!