Search Unity

how do i setup an orthographic view

Discussion in 'iOS and tvOS' started by paul4tune, Mar 17, 2012.

  1. paul4tune

    paul4tune

    Joined:
    Oct 8, 2011
    Posts:
    38
    the iphone screen is 480x320 and retina is 960x640,how do i correctly portray that using orthographic projection.i have size there but im not sure what to set that to to get the correct size,i import my retina images @ 960x640.all in 2d.


    thanks
     
  2. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,572
    Set Projection to Orthographic. Set Size to half your pixel screen height. Now one world unit = one pixel. You don't have to do it that way, but it makes the maths easier.
     
  3. paul4tune

    paul4tune

    Joined:
    Oct 8, 2011
    Posts:
    38
    so do i use the retina size landscape 640 height so it would be 320 or the actual size 320 half is 160,isnt 160 size abit big or am i just missing the point completely

     
  4. paul4tune

    paul4tune

    Joined:
    Oct 8, 2011
    Posts:
    38
    so to try and get the real sizes,i created a camera in my 3d program,made the out put 960x640 then created a cube that fitted the screen size exported the fbx,imported into unity altered the size of the camera to fit that box exactly to the camera then put my background onto that box.the size works out to 2.28 to fit that box of 960x640
     
  5. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,572
    Do it the Retina size. The lower res textures for the lower res screen balance it out.

    The size is big, but it doesn't matter until you are using physics. You can alway make things smaller and build in a scaling factor. The only point with that size is that 1 unit = 1 pixel. You could use what size you want. for example: If you have built your environment and want your screen to show 46 world units vertically, then make the Size 23.