private void TryToThrow(bool isRightHanded) { if (HoldingObject) { // Prevent opposite handed motions from throwing if (isRightHanded == _usingRightHand) { InHand.Throw(ThrowOrigin, isRightHanded); InHand = null; OnThrown.Invoke(); } } }
private void TryToCatch(Throwable t) { if (HoldingObject) { t.CompleteThrow(); } else { Pickup(t); OnCatch.Invoke(); } }
private void Pickup(Throwable t) { if (t == null) { return; } InHand = t; InHand.PickUp(_usingRightHand); GameObject obj = InHand.gameObject; obj.transform.localRotation = Quaternion.identity; obj.transform.SetParent(Hand.transform, false); OrientHeldObject(); OnObjectSpawned.Invoke(); }