mirror of
https://github.com/PashaBibko/The-Mobius-Line.git
synced 2026-04-03 17:39:03 +00:00
Changed how slope detection works
There is a bug with the camera
This commit is contained in:
@@ -31,7 +31,7 @@ public partial class PlayerMovement : MonoBehaviour
|
||||
// Correctly applies force on slopes
|
||||
if (m_OnSlope)
|
||||
{
|
||||
Vector3 slopeDir = m_SlopeHit.normal;
|
||||
Vector3 slopeDir = m_StandingOn.normal;
|
||||
slopeDir.y = 0.0f - slopeDir.y;
|
||||
m_Body.AddForce(slopeDir.normalized * m_SlideSpeed * m_Body.mass * 10, ForceMode.Force);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user