public void ThrowObject(float throwPower) { if (_currentlyPickedObject != null) { var worldMousePosition = Input.mousePosition; worldMousePosition.z = (transform.position.z - TCameraController.Instance.transform.position.z); worldMousePosition = TCameraController.Instance.CameraComponent.ScreenToWorldPoint(worldMousePosition); worldMousePosition.z = transform.position.z; Vector3 throwDirection = (worldMousePosition - transform.position).normalized; _currentlyPickedObject.transform.SetParent(null); _currentlyPickedObject.Thrown(throwDirection * throwPower); _currentlyPickedObject = null; } }