Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Camera Zoom in and zoom out c# UNITY2D 4.6

Discussion in 'Physics' started by bangtam, Jan 6, 2015.

  1. bangtam

    bangtam

    Joined:
    Jun 13, 2014
    Posts:
    7
    hello everybody, i am a new mem I have a problem, i WANT is zooming 1 image background in gun game using binoculars, game3d is very easy but I used in game2d.
    Camera.main.orthographic = true;
    Camera.main.orthographicSize = 5;
    or view zoom ...vv and I found scene screen is ok, but game screen is not... :(( help me
    ..............thank you......i am used unity 2D 4.6 beta.
     
  2. SeasiaInfotechind

    SeasiaInfotechind

    Joined:
    Nov 17, 2014
    Posts:
    32
    Hi,
    From my understanding of your problem You can use two camera and set the culling mask in the inspector.
    thanks
     
  3. bangtam

    bangtam

    Joined:
    Jun 13, 2014
    Posts:
    7
    thank you but one or two camera will be , but i have a question , I want to move the camera go to the mouse click position to enlarge.

     
  4. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    One way for a zoom effect I've used in the past involves using the cameras FOV - but what about using a second camera to move closer to the object and capture the image to a RenderTexture?
     
  5. bangtam

    bangtam

    Joined:
    Jun 13, 2014
    Posts:
    7
    thank you , I did it ^^