Esempio n. 1
0
 void OnTriggerExit(Collider other)
 {
     Debug.Log("Trigger exit");
     if (other.gameObject.GetComponent <adjustable>() != null)
     {
         other.GetComponent <adjustable>().onPullEnd(this.transform.position);
     }
     potentialAdjust = null;
 }
Esempio n. 2
0
 void OnTriggerEnter(Collider other)
 {
     if (other.tag == "Adjustable")
     {
         Debug.Log("Can adjust");
         if (potentialAdjust != null)
         {
             potentialAdjust.onPullEnd(this.transform.position);
         }
         potentialAdjust = other.GetComponent <adjustable>();
     }
 }
Esempio n. 3
0
 // Use this for initialization
 void Start()
 {
     potentialAdjust = null;
     trackedObj      = GetComponent <SteamVR_TrackedObject>();
 }