I’m having issues with the camera turning in my project, occasionally the camera will rotate half war around the character in my 3rd person camera mode. It seems like the cursor is hitting the edge of the window and looping over to the other side but if you console.log the pointer after it has been locked it seems that stays in the middle and sends values that are less than (+/-)10.
edit: I forgot to mention that the issues are only present on the X-axis.
That’s funny, no matter how many times I rotate from the same perspective around the character it seems to be behaving here (tested on both firefox/chrome).
Though from your video, I’ve seen that before. I think it’s the limitation of when using euler angles that get converted back to quaternions.
I don’t know if it works with your existing system but maybe a solution would be instead of using SetEulerAngles() to use rotate() directly. By applying directly the dx/dy rotation diff. I may be wrong though it may be something different.
I tried on Mozilla with no add-on and chrome. I’m using a Logitech G903 so I don’t think its that. I logged the rotation just like the person @Leonidas mentioned above and experienced the same issue.
Do you know how @petemolineros’s issue was solved?
I have seen similar issues with rotation, using eulers. Sometimes, the X- and Z- axis will “flip” and both be 180 (or both back to 0), as you are rotating about the Y-axis. If you are only setting the X- and Y-axes (as in the code above), then you’ll only be correct part of the time.
Try using “rotate” instead of assigning eulers directly.