private void OnMouseDown() { hit = RayCast.CameraRayCast(); if (hit.collider != null && (gameObjectToAttached.Contains(hit.collider.attachedRigidbody) || hit.collider.tag == "PushRigidByClick")) { pushRigidBody(hit.collider.attachedRigidbody); } }
public void ShowMessageOnRayCast() { hit = RayCast.CameraRayCast(); if (hit.collider != null && hit.collider.gameObject == gameObject && !UIController.MenuPanel.activeSelf && !UIController.ScrollArea.transform.parent.parent.gameObject.activeSelf) { ShowOutline(); if (Input.GetKeyDown(KeyCode.Mouse0)) { UIController.ShowMessage(text); } } else { HideOutline(); } }