Camera Limits

Follow

Comments

3 comments

  • Avatar
    CarstenSchonart

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

     

  • Avatar
    James

    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?

  • Avatar
    CarstenSchonart

    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.

     

Please sign in to leave a comment.