private void OnPointerDown(Vector2 pointerScreenPosition, Vector2 lastPointerPosition, int buttonIndex) { if (buttonIndex == 0) { RaycastHit hit; var ray = Camera.main.ScreenPointToRay(pointerScreenPosition); if (Physics.Raycast(ray, out hit)) { var handle = hit.collider.GetComponent <VelocityHandle>(); if (handle != null && handle.CelestialBodyRef != null) { _currentTarget = handle; } } } }
private void OnPointerUp(Vector2 pointerScreenPosition, Vector2 lastPointerPosition, int buttonIndex) { _currentTarget = null; }