|
@@ -12,6 +12,7 @@ namespace Wheels
|
|
|
private const float MAX_RAYCAST_LENGTH = 2f;
|
|
|
public int collisionLayer = 1;
|
|
|
|
|
|
+ public float maxBikeAngle = 8.6f;
|
|
|
public Transform rearWheelContact;
|
|
|
public Transform frontWheelContact;
|
|
|
public Rigidbody bike;
|
|
@@ -89,7 +90,7 @@ namespace Wheels
|
|
|
|
|
|
var slopeDif = SlopeDirection * (currentFrontWheelSlope - bikeAngle);
|
|
|
if (Mathf.Abs(currentFrontWheelSlope - bikeAngle) <
|
|
|
- TOLERANCE)
|
|
|
+ TOLERANCE || Mathf.Abs(bikeAngle) > maxBikeAngle)
|
|
|
{
|
|
|
rotate = false;
|
|
|
return;
|