void OnTriggerExit(Collider other) { if (GameObject.ReferenceEquals(other.gameObject, cameraRig.GetComponent <RaycastPointer>().pickedUpObject)) { rp = cameraRig.GetComponent <RaycastPointer>(); rp.objDistance -= 0.1f; isOutside = true; } }
void OnTriggerEnter(Collider other) { if (GameObject.ReferenceEquals(other.gameObject, cameraRig.GetComponent <RaycastPointer>().pickedUpObject)) { if (rp != null) { isOutside = false; rp = null; } } }