Quantcast
Channel: Latest Questions by Daniel Girgis
Viewing all articles
Browse latest Browse all 22

GUI texture ? help please

$
0
0

i got a script to zoom the camera and i have a crosshair texture but i am having trouble getting the texture to go full screen on mouse click down heres the script its C#

using UnityEngine;
using System.Collections;

public class NewBehaviourScript : MonoBehaviour {
    public float altFieldOfView = 10.0f;

    void Update () {
        if(Input.GetMouseButtonUp(1)) {
            float temp = camera.fieldOfView;
            camera.fieldOfView = altFieldOfView;
            altFieldOfView = temp;
        }
        if(Input.GetMouseButtonDown(1)) {
            float temp = camera.fieldOfView;
            camera.fieldOfView = altFieldOfView;
            altFieldOfView = temp;
        }
    }
}

Viewing all articles
Browse latest Browse all 22

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>