예제 #1
0
 private void OnTriggerStay(Collider c)
 {
     if (!grabbing)
     {
         if (grabTarget == null)
         {
             grabTarget = c.GetComponent <GrabObjectController> ();
         }
     }
 }
예제 #2
0
 private void OnTriggerExit(Collider c)
 {
     if (!grabbing)
     {
         if (grabTarget != null)
         {
             if (c.gameObject.GetComponent <GrabObjectController>() == grabTarget)
             {
                 grabTarget = null;
             }
         }
     }
 }