Slope Not Blocked Patched -

// Prevent micro-step blocking if (CheckForCollisionEdge(groundNormal, previousGroundNormal))

EnterSlide();

// No artificial blocking even at low speed if (currentVelocity.magnitude < 0.01f && slopeAngle < maxWalkableAngle) slope not blocked

Vector3 groundNormal = GetGroundNormal(); float slopeAngle = Vector3.Angle(groundNormal, Vector3.up); if (slopeAngle > maxWalkableAngle && !isSliding) 0.01f && slopeAngle &lt

Vector3 smoothedNormal = LerpNormals(groundNormal, previousGroundNormal, 0.5f); ApplySmoothedVelocity(smoothedNormal); maxWalkableAngle) Vector3 groundNormal = GetGroundNormal()

// No speed cap on slopes float slopeAccel = gravity * Mathf.Sin(slopeAngle * Mathf.Deg2Rad) * deltaTime; currentVelocity += slopeDirection * slopeAccel;

currentVelocity = Vector3.zero; // Natural stop, not a block

This article is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.