I often position and use camera.lookAt
on my perspective camera so I am sure how my camera is oriented. However, with a FirstPersonCameraController
it start to roll when I move the camera from left to right and thus not properly functioning anymore as a FirstPersonCameraController
. Is there a way to fix this or use the FirstPersonCameraController
to make the camera look at a specific point to keep it functioning properly? Without using lookAt
or rotating the camera on both x and y axis the FirstPersonCameraController
functions properly, so I guess it is just a by product from working on a already rotated camera.
0
votes
1 Answers
0
votes
At the time of writing the last line of the question I fixed the issue, still posting to help others.
I figured I reset the up vector of the camera. I guess the FirstPersonCameraController
uses this to calculate rotation. So after rotating the camera (or using lookAt
):
camera.up.set(0, 1, 0);
Thanks for being my rubber duck once again stackoverflow.