Now able to look any direction during wall ride

Also made a key bind for wallride
This commit is contained in:
2025-03-28 13:55:49 +00:00
parent b69a6028f6
commit 639cb88e63
8 changed files with 210 additions and 132 deletions

View File

@@ -19,7 +19,7 @@ public partial class PlayerMovement : MonoBehaviour
bool canSlide = !(Mathf.Abs(vel.x) < m_SlideRequiredSpeed && Mathf.Abs(vel.z) < m_SlideRequiredSpeed);
// Checks if the player is in the wall running state
if (m_HitLhsWall || m_HitRhsWall)
if (GetNormalOfClosestCollider(out m_WallNormal) && m_WallRunKeyPressed)
{ m_State = PlayerState.WALL_RUNNING; }
// Checks if the player is in the wall riding state