Browse Source

slope fix

Marcel Zickler 2 years ago
parent
commit
c26a4d4379

File diff suppressed because it is too large
+ 6 - 3
Assembly-CSharp-Editor.csproj


File diff suppressed because it is too large
+ 6 - 3
Assembly-CSharp.csproj


+ 2 - 1
Assets/Scripts/Wheels/LerpSlopeCollider.cs

@@ -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;

File diff suppressed because it is too large
+ 6 - 3
SteamVR.csproj


File diff suppressed because it is too large
+ 6 - 3
SteamVR_Editor.csproj


File diff suppressed because it is too large
+ 6 - 3
SteamVR_Input_Editor.csproj


File diff suppressed because it is too large
+ 6 - 3
SteamVR_Windows_EditorHelper.csproj


Some files were not shown because too many files changed in this diff