using UnityEngine; using System.Collections; public class Eye : MonoBehaviour { // Update is called once per frame void Update () { RaycastHit hit; if (Physics.Raycast (transform.position, transform.forward * 10, out hit)) { // Select picture. Player.Instance.SetLookedObject (hit.collider.gameObject); } else { Player.Instance.SetLookedObject (null); } } }