As a newcomer to Three js, I've been grappling with a challenge lately.
My 3D model is currently facing a specific direction, surrounded by a sphere. Before I move the mesh, I want to animate its rotation so that it aligns with the specified sphere.
Although I've managed to determine the angle of rotation, I suspect there might be a better approach.
This is my current method for rotating the object towards a designated point:
if(movementTarget) { playerModel.lookAt(movementTarget); }
Here is the content of the
movementTarget = {x:154,y:55,z:35};
It appears that the model is not correctly aligning itself with the sphere, but rather with an empty space. I'm uncertain about the root of the issue.