Skip to content

Commit

Permalink
fix: move ledgecheck when crouching
Browse files Browse the repository at this point in the history
  • Loading branch information
Aniol0012 committed Dec 22, 2024
1 parent d8fd306 commit 6d284b4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Assets/Scripts/Mechanics/Movement/Crouch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ private void StartCrouch(bool isRunning) {
animator.SetBool(IsCrouching, true);
CameraManager.Instance.SetOffset(cameraOffsetOnCrouch);

ledgeCheck.transform.position += new Vector3(0, -0.1f, 0);
_playerController.AddPosition(0f, -0.3f);
colliderManager.UpdateCollider(true, crouchColliderOffset, crouchColliderSize);

Expand Down Expand Up @@ -165,6 +166,7 @@ private void EndCrouch() {

CameraManager.Instance.SetOffset(Vector2.zero);

ledgeCheck.transform.position += new Vector3(0, 0.1f, 0);
_playerController.AddPosition(0, 0.3f);
colliderManager.UpdateCollider(false, standingColliderOffset, standingColliderSize);

Expand Down

0 comments on commit 6d284b4

Please sign in to comment.