Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

How can I zoom scene view camera further?

Discussion in 'Scripting' started by Stef_Morojna, Nov 12, 2016.

  1. Stef_Morojna

    Stef_Morojna

    Joined:
    Apr 15, 2015
    Posts:
    289
    Ok so I have a game where I need really big objects (like 150km size planet) (and yes I can't have smaller planets, because then the physics just won't work like they should...)

    The problem that I have is that in the scene view I can't zoom out far enough so that I could see the entire scene. I can only see parts of the planet, and its really hard to work with it.

    upload_2016-11-12_18-41-31.png

    As you can see, I can't even see half the planet

    Is there any way to change the max zoom out distance in scene view? or something?
     
    Last edited: Nov 12, 2016
  2. hpjohn

    hpjohn

    Joined:
    Aug 14, 2012
    Posts:
    2,190
    So what happens when you focus the object? it just disappears?
     
  3. Stef_Morojna

    Stef_Morojna

    Joined:
    Apr 15, 2015
    Posts:
    289
    it zooms on it, so all I see is a while screen.
     
    Last edited: Nov 12, 2016
  4. Pzula

    Pzula

    Joined:
    Jan 25, 2013
    Posts:
    7
    Is your object 150,000 units in size? Be aware that building a game with these sized objects is unrealistic. Many planet size and universe sized games like Kerbal Space Program use a number of tricks to achieve games of this scale e.g. loading only part of the planet, varying terrain level of detail, floating point origin, multiple camera setups to achieve an illusion of size.

    Here is a great talk that the people from Kerbal Space Program delivered where they talk about the challenges they faced and how they achieved such a large scale game. They begin talking about Procedural Quad Spheres and other techniques around the 30minute40second mark which may be of your interest.


    Here is another good video which demonstrates the technique of 3D Skyboxes to achieve the illusion of object size:


    Building a game of this scale is no easy feat. It will take a lot of research and patience to build a working system. Be sure to do your homework for this one!
     
  5. Stef_Morojna

    Stef_Morojna

    Joined:
    Apr 15, 2015
    Posts:
    289
    Well it so happens that I already did my homework :p

    I already use some of those kinds of tricks, or physics would be impossible( or at least very glitch as you get far from 0x 0y and float numbers start to get imprecise).

    Here is a gif of it:
    http://imgur.com/a/VgPfo

    The red square is a 1000x1000 border, that every time the player passes, it teleports the player back to 0x 0y (and also moves the planet and everything else that there is in the scene).

    From the point of view of the player you don't see the teleportation, because everything else that the player could use as a reference point is also teleported.

    The problem that I have is that in the scene view I can't zoom out far enough so that I could see the entire scene. I can only see parts of the planet, and its really hard to work with it.
     
    Last edited: Nov 12, 2016
  6. Deleted User

    Deleted User

    Guest

    Won't work dude. Every time you "move the planet" and move the player to 0,0,0... the frame rate will hickup. Unless maybe your scene has like no objects and the planet terrain is really simple. You won't like it.

    EDIT: unless maybe your movement of the planet is just x and y, I donno. The more objects, or the more complex, the more hickup. Specially if you need to like rotate everything as you walk around the planet or something like that. Won't be smooth.
     
  7. Stef_Morojna

    Stef_Morojna

    Joined:
    Apr 15, 2015
    Posts:
    289
    I tested it on mobile with over 1000 RigidBody2d objects and 1 teleport per second and it worked smooth (I was not able to see any frame drop, basically it was impossible for me to tell when it teleported).

    The planet terrain will be simple, and will also only add detail only to the parts of the planet that are close to the player.
     
  8. Stef_Morojna

    Stef_Morojna

    Joined:
    Apr 15, 2015
    Posts:
    289
    I just move it x and y, and only every time the player passes 1000 units from the 0 0 coordinates.
     
    Last edited: Nov 12, 2016