private void OnTriggerStay(Collider c) { if (!grabbing) { if (grabTarget == null) { grabTarget = c.GetComponent <GrabObjectController> (); } } }
private void OnTriggerExit(Collider c) { if (!grabbing) { if (grabTarget != null) { if (c.gameObject.GetComponent <GrabObjectController>() == grabTarget) { grabTarget = null; } } } }