Can anyone kindly help me create a shooting script for a sniper rifle? Ive tried many shooting scripts all don’t work.
I can’t help you create it much beyonfpd suggesting either using a second camera, with a tighter zoom or just zooming in your main camera.
use a second camera here a little script for java
var Aim : boolean = false;
var Cam : GameObject;
function Update () {
if(Input.GetMouseButtonDown(1)){
Aim = true;
if(Aim == true){
Cam.active = true;
}
}
if(Input.GetMouseButtonUp(1)){
Aim = true;
if(Aim){
doesnt work
Honestly, after reading it did you really expect it to?
lol
learn how to make a button work. then learn how to change a value upon pressing that button. then apply that value to the zoom of your camera.
^ +1 to renman