浏览代码

slope fix

Marcel Zickler 3 年之前
父节点
当前提交
c26a4d4379

文件差异内容过多而无法显示
+ 6 - 3
Assembly-CSharp-Editor.csproj


文件差异内容过多而无法显示
+ 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;

文件差异内容过多而无法显示
+ 6 - 3
SteamVR.csproj


文件差异内容过多而无法显示
+ 6 - 3
SteamVR_Editor.csproj


文件差异内容过多而无法显示
+ 6 - 3
SteamVR_Input_Editor.csproj


文件差异内容过多而无法显示
+ 6 - 3
SteamVR_Windows_EditorHelper.csproj


部分文件因为文件数量过多而无法显示