-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set min and max angles for camera #13
Comments
Out of curiosity has anyone managed to solve this issue? |
@ob6160 I didn't actually, I just changed my application to get around the issue, which wasn't the best solution |
If I knew more maths than I did I'd have a go at solving this haha |
@ob6160 haha same, I haven't taken linear algebra yet 😛 |
I found a solution which works for me :) After the quaternion has been set, to limit the rotation of the camera on either side I just ran this:
|
It would be great if there was an API to set max and min horizontal and vertical rotation. For example, if I wanted my camera to rotate from
[Math.PI, 0]
on the y-axis. Orbit Controls has the ability tocamera.minPolarAngle
orcamera.maxAzimuthAngle
The text was updated successfully, but these errors were encountered: