Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Zooming between maps

Discussion in 'Scripting' started by Doompanther, Aug 28, 2012.

  1. Doompanther

    Doompanther

    Joined:
    Aug 11, 2012
    Posts:
    24
    Hey there.

    I have a question about which method is “better” when going from one zoomed in map view to a much further zoomed out map view.


    This is what I want to do. When the camera is looking at an object the player to has the ability to move the camera out and zoom out. When the player does this, I want to display an overview look of that object and surrounding objects. So when Camera is X units away from Object A, turn Object A into a sprite of Object A. Also, because you've zoomed out, other objects; like object B, should also be sprites and viewable.

    Here's a visual representation of what I want to do (hopefully it doesn't make things more confusing.)

    http://imgur.com/HESDm

    The two options that I've thought of are these:

    1. Change scenes on zoom. The first focused object is in scene A, when the player zooms out, the scene fades into Scene B; which holds the sprites of both objects 1 and 2. When the player zooms in, the system determines which object the camera is closest to and changes the scene to that object.

    The problems with this are: difficulty of keeping variables between scenes, keeping multiple scenes running at the same time.

    2. Everything is on the same scene, but when camera moves away from object A turn off the mesh render and place the sprite at it's location.

    Problems with this are: huge scene, objects can be millions of units away from each other. Organization can be an issue.


    What other ways are there to complete this? What other problems are there with the two options I've pointed out?