From 6d284b4c3c12d3b89ab84f8b7ea0912e8f865d31 Mon Sep 17 00:00:00 2001 From: Aniol0012 Date: Sun, 22 Dec 2024 22:15:19 +0100 Subject: [PATCH] fix: move ledgecheck when crouching --- Assets/Scripts/Mechanics/Movement/Crouch.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Assets/Scripts/Mechanics/Movement/Crouch.cs b/Assets/Scripts/Mechanics/Movement/Crouch.cs index 0d31511..46969fb 100644 --- a/Assets/Scripts/Mechanics/Movement/Crouch.cs +++ b/Assets/Scripts/Mechanics/Movement/Crouch.cs @@ -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); @@ -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);