public void ReleaseArrow() { // Start sound immediately playBowRelease(); // No longer "holding" the arrow if (arrowGrabbable) { // Reset Arrow Grab to Grip arrowGrabbable.GrabButton = GrabButton.Grip; arrowGrabbable.DropItem(false, true); // We can apply velocity now arrowGrabbable.AddControllerVelocityOnDrop = true; } // Calculate shot force float shotForce = BowForce * StringDistance; GrabbedArrow.ShootArrow(GrabbedArrow.transform.forward * shotForce); // Make sure hands are showing if we hid them arrowGrabber.ResetHandGraphics(); resetArrowValues(); }
public virtual void ReleaseGrabber() { if (currentGrabber != null) { dummyGrabbable.CanBeDropped = true; dummyGrabbable.BeingHeld = false; currentGrabber.HeldGrabbable = null; if (MoveOutStyle == HandMovement.Instant) { currentGrabber.ResetHandGraphics(); } else if (MoveOutStyle == HandMovement.Lerp) { currentGrabber.ResetHandGraphics(); } currentGrabber = null; } }