Browse Source

Reduced tolerance for early out when contact normal equals surface normal in ActiveEdges::FixNormal (#687)

This could cause a godot character to not be able to walk up a slope under an angle slightly less than the max slope angle.

See discussion #679
Jorrit Rouwe 1 year ago
parent
commit
14c0854322
2 changed files with 3 additions and 3 deletions
  1. 2 2
      .github/workflows/determinism_check.yml
  2. 1 1
      Jolt/Physics/Collision/ActiveEdges.h

+ 2 - 2
.github/workflows/determinism_check.yml

@@ -1,8 +1,8 @@
 name: Determinism Check
 name: Determinism Check
 
 
 env:
 env:
-    CONVEX_VS_MESH_HASH: '0x412693f5fd7ee9f6'
-    RAGDOLL_HASH: '0xf6bc510ce5a03e4b'
+    CONVEX_VS_MESH_HASH: '0x10139effe747511'
+    RAGDOLL_HASH: '0x93470b2bd0a04d75'
 
 
 on:
 on:
   push:
   push:

+ 1 - 1
Jolt/Physics/Collision/ActiveEdges.h

@@ -59,7 +59,7 @@ namespace ActiveEdges
 
 
 		// Some edges are active.
 		// Some edges are active.
 		// If normal is parallel to the triangle normal we don't need to check the active edges.
 		// If normal is parallel to the triangle normal we don't need to check the active edges.
-		if (inTriangleNormal.Dot(inNormal) > 0.996195f * normal_length * triangle_normal_length) // cos(5 degrees)
+		if (inTriangleNormal.Dot(inNormal) > 0.999848f * normal_length * triangle_normal_length) // cos(1 degree)
 			return inNormal;
 			return inNormal;
 
 
 		const float cEpsilon = 1.0e-4f;
 		const float cEpsilon = 1.0e-4f;