I am trying to use the mouse to rotate my view. The math is simple: Y movement generates a change in latitude (the X-axis) and X movement generates a change in longitude (the Y-axis). I have created a listener which detects mouse movement.
I am not moving the camera directly. Instead, I am moving an object around the center and tracking it with the camera, so the result should be about the same.
The problem I am having is that X movement appears to be limited. I can only perform a few rotations in either direction before I hit a “wall”. I assume that what is happening is that the mouse is traveling the entire width of the page and when it hits the end, it stops.
Is there a way to avoid this limitation?
If I could use the three.js controls routines, that would be great. However, I want to do two different things: (1) if a mouse button is not pressed, I want to do the above, and (2) if a mouse button is pressed, I want to switch to simply rotating the camera around the center.