Camera Limits

Follow

Comments

5 comments

  • Avatar
    CarstenSchonart (Sketchfab Profile)

    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" .

     

    0
    Comment actions Permalink
  • Avatar
    James (Sketchfab Profile)

    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?

    0
    Comment actions Permalink
  • Avatar
    CarstenSchonart (Sketchfab Profile)

    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.

     

    1
    Comment actions Permalink
  • Avatar
    aerialengineering (Sketchfab Profile)

    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

    0
    Comment actions Permalink
  • Avatar
    James (Sketchfab Profile)

    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/

    0
    Comment actions Permalink

Please sign in to leave a comment.