Changed how slope detection works

There is a bug with the camera
This commit is contained in:
Pasha Bibko
2025-03-30 17:26:31 +01:00
parent 86acfab81d
commit 8610868924
7 changed files with 129 additions and 91 deletions

View File

@@ -15,7 +15,6 @@ public partial class PlayerMovement : MonoBehaviour
[Header("Ground Check")]
[SerializeField] float m_PlayerHeight;
[SerializeField] LayerMask m_GroundMask;
[SerializeField] LayerMask m_SlopeMask;
[Header("Sliding Settings")]
[SerializeField] float m_SlideRequiredSpeed;
@@ -71,9 +70,8 @@ public partial class PlayerMovement : MonoBehaviour
bool m_FlippedWallRideDirectionFirstFrame = false;
Vector3 m_LastWallNormal;
// Raycast hit objects
RaycastHit m_GroundHit;
RaycastHit m_SlopeHit;
// What the player is standing on
RaycastHit m_StandingOn;
//
BoxCollider m_WallCollider;