예제 #1
0
 void OnTriggerExit(Collider other)
 {
     if (other.tag == "Touchable")
     {
         LeapUnitySelectionController.Get().OnStoppedTouching(gameObject, other);
     }
 }
예제 #2
0
 void OnTriggerEnter(Collider other)
 {
     if (other.tag == "Touchable")
     {
         LeapUnitySelectionController.Get().OnTouched(gameObject, other);
     }
 }
예제 #3
0
 void OnCollisionEnter(Collision collision)
 {
     Debug.Log("OnCollisionEnter");
     Debug.Log(gameObject);
     if (collision.collider.tag == "Touchable")
     {
         LeapUnitySelectionController.Get().OnTouched(gameObject, collision.collider);
     }
 }
예제 #4
0
 void FixedUpdate()
 {
     if (gameObject.collider.enabled)
     {
         Debug.DrawRay(transform.position, transform.forward, Color.green);
         RaycastHit hit;
         if (Physics.Raycast(transform.position, transform.forward, out hit, 20.0f))
         {
             LeapUnitySelectionController.Get().OnRayHit(hit);
         }
     }
 }