Need help with sniper scope.

Hey guys, so ive been creating weapons, scripting movement, aiming, etc… But when i started with the sniper, i couldnt, and still cant figure out, when i aim to zoom really close i cant see, cause when i zoom in i cant see threw my scope. So maybe you know what script i should use? I tried do it by my self, but when i start the game, my screen is black and when i zoom my scope is messed up. soo… :smile:

P.S maybe you know some good video tutorials on youtube? I was watching eteeski lately, but he doesnt show how tu put animations, hes scripts doesnt work with some things, for excample crouching makes your character smaller, and thats not what i wanna do. You get the point. :smile: :slight_smile:

Thank you very much!

:face_with_spiral_eyes::face_with_spiral_eyes::expressionless:

if(Input.GetMouseButton(1))
{
    //we are zomming in
    Camera.main.fieldOfView = 40;
}
else
{
    //not zooming in anymore
    Camera.main.fieldOfView = 80;   //whatever your fieldOfView originaly is set to
}

Yea, thanks, i know how to zoom, but i want to use sniper image when i zoom in with my sniper.

Either use a post process effect to add an overlay of the image, or create a billboard with the image placed in front of the camera.
Post process effects require Unity pro though.

or make a plane, put in front of camera, and whenever the right click mouse button is pressed, do GameObject.Find(“MyScopeTexturethatsInFrontOfTheCamera”).renderer.enabled = true; and vise versa, make sure that plane is child of camera and has a transparent diffuse scope texture