private void Update() { GetInput(); if (arrowHeld && arrowInPlace && primaryTriggerValue <= 0) { bow.FireArrow(); } UpdatePlaceholderArrow(); DebugPanel.Log("RH Position", rightHandControllerPosition); DebugPanel.Log("Primary Trigger", primaryTriggerValue); DebugPanel.Log("Arrow Held", arrowHeld); DebugPanel.Log("Arrow In Place", arrowInPlace); DebugPanel.Log("Pull Distance", pullDistance); }
private void Update() { RetrieveVRInput(); HeavyCalculations(); CalculateBodyOrientation(); if (arrowHeld && arrowInPlace && ((arrowHand == Hand.left && !vrInput.leftTrigger) || (arrowHand == Hand.right && !vrInput.rightTrigger)) && canShoot) { totalArrowsFired++; var arrow = bow.FireArrow(); onArrowShot?.Invoke(arrow); } UpdateShownHands(); UpdateBow(); UpdatePlaceholderArrow(); ArrowCameraControls(); if (debugValues) { DebugValues(); } }