Let me get straight to the point - math is not my strong suit. What may be a piece of cake for you is like solving complex equations in outer space for me.
Currently, I am using Three.js with CSS3DRenderer to construct a virtual art gallery.
What I really need is a first-person perspective, similar to that of a FPS game.
I've managed to make the camera move forward, backward, left, and right successfully.
However, when it comes to rotating the camera, let's just say the results are not what I expected.
The issue lies in my camera rotating on its local axis instead of the viewport itself.
What I truly desire is for the camera to orbit around a specific pivot point/vector, and then readjust its focus using Object3d.lookAt()
.
I understand that I could simply parent the camera as a child of another object and manipulate the object's axis to achieve this effect. But personally, I prefer to delve into the mathematical calculations myself.
In essence, I want to comprehend how to have one vector point rotate around another, and the mathematical representation behind it.
I am not looking to take the easy route by relying on pre-made scripts like the three.js pointer_lock controls. I am eager to roll up my sleeves and tackle the challenge head-on with pure mathematics.
Any guidance or references to tutorials would be greatly valued and appreciated!