Skip to content

Commit

Permalink
fix crouchspeed locked by jump
Browse files Browse the repository at this point in the history
  • Loading branch information
Fueredoriku committed Nov 6, 2023
1 parent 17ea1b4 commit c536632
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Assets/Scripts/Control&Input/PlayerMovement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,11 @@ private void SetCrouch(InputAction.CallbackContext ctx)

if (ctx.performed)
{
if (IsInAir())
return;
animator.SetBool("Crouching", true);
strafeForce = strafeForceCrouched;
if (!IsInAir())
inputManager.gameObject.LeanMoveLocalY(localCameraHeight - crouchedHeightOffset, 0.2f);
inputManager.gameObject.LeanMoveLocalY(localCameraHeight - crouchedHeightOffset, 0.2f);
}

if (ctx.canceled)
Expand Down

0 comments on commit c536632

Please sign in to comment.