Pro members and above can constrain the movement of the camera around a model or scene. You can find the Limit Orbit Camera controls in the Camera section of Scene Settings.
Example
In this example, notice how you can rotate around the model, but you cannot look below the model. You also cannot zoom in or zoom out past a certain distance.
Exceptions
- Annotations are incompatible with Camera Limits (except via the Viewer API).
- Double-click navigation is incompatible with Camera Limits while Limit Pan is enabled.
- Viewing a model through the Inspector will override Camera Limits.
Preview
Click Preview Camera Limits or Exit Preview at any time to toggle whether the editor view is constrained by your current settings.
Limit Pan
By default, camera panning is limited. You can disable Limit Pan to allow panning the camera, which also allows Double-click navigation within your zoom and rotation limits.
Limit Zoom
Set the maximum distance the viewer can zoom in or out. Click Set From View to use the current distance.
Limit vertical rotation (pitch)
Set the maximum amount the viewer can rotate up and down. You can move the sliders, enter a number (in degrees) or click and drag the blue nodes in the viewer.
Limit horizontal rotation (yaw)
Set the maximum amount the viewer can rotate left and right. You can move the sliders, enter a number (in degrees) or click and drag the blue nodes in the viewer.
Combination
You can use any combination of limiting zoom, pitch, and yaw. You can also move the entire limited volume with respect to the model or scene: select any node in the preview, then click and drag the axes that appear.
Comments
5 comments
Can the min/max - rotation values be changed in runtime by script?
Imagine we orbit around the center of a house on a groundplane.
In order to give the viewer the best experience, we want to prevent to go lower than the groundplane.
The minimum angle will change according to the camera distance (zoom).
(See my little example.)
If this can´t be done, I wouldn´t call this a "Pro-Feature" .
Ah, interesting, so you want to be able to look up while inside the building, for example. It's a cool idea but not currently in the scope of camera limits. What does setting this up look like in your Unity player?
The main idea is to districtly avoid to see the (architecture/landscape) model from below, because it is unnatural and therefore mostly a negative experience. A nice side effect of a realtime updated angle is indeed the effect that the closer you zoom in the more upwards the camera may look.
The maths behind it is very simple:
minAngle = asin (orbitcentreheight/zoomdistance)
It is easy to implement and of almost no performance cost.
Users will surely appreciate this little but handy feature, may be as an option to choose for the orbitcamera.
Hi there,
Is it possible to allow annotations and the use of camera limits?
Seems odd that the 2 cannot be together. Apart of the reason i purchased this is i assumed i could limit the orbit and have annotations.
Cheers
Hello,
At the moment, annotations are incompatible with camera limits. It's quite a complicated topic, both the behavior and the UI for the editor. E.G. does each annotation have it's own set of limits? or must all the annotation views be within the global limits? what happens when you move between them? etc.
It's something we want to do in the future, but I don't have an ETA.
For now, it would be possible to do it by setting camera limits in the model settings and then creating annotations programmatically using the Viewer API. This would only be possible in the context of an embed on your website though, not on the regular model page. Here's a simple example: https://jsfiddle.net/PadreZippo/u2yhtj1L/
Please sign in to leave a comment.