Search Unity

Scope Zoom?

Discussion in 'Editor & General Support' started by elias723, Apr 13, 2006.

  1. elias723

    elias723

    Joined:
    Feb 10, 2006
    Posts:
    178
    How can I make a script that will allow my camera to zoom to a set magnification when I press a button? I can't find any camera zooming or any workarounds (like making the viewing screen too big). Thank you in advance for your assistance.
     
  2. hsparra

    hsparra

    Joined:
    Jul 12, 2005
    Posts:
    750
    How about just moving the camera closer along its z-axis when zooming?
     
  3. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Modifying the field of view does this.

    Code (csharp):
    1.  
    2. Camera.main.fieldOfView = 10;
    3.