void OnTriggerExit(Collider other) { if (other.tag == "Touchable") { LeapUnitySelectionController.Get().OnStoppedTouching(gameObject, other); } }
void OnTriggerEnter(Collider other) { if (other.tag == "Touchable") { LeapUnitySelectionController.Get().OnTouched(gameObject, other); } }
void OnCollisionEnter(Collision collision) { Debug.Log("OnCollisionEnter"); Debug.Log(gameObject); if (collision.collider.tag == "Touchable") { LeapUnitySelectionController.Get().OnTouched(gameObject, collision.collider); } }
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); } } }