diff --git a/src/Jitter2/Collision/CollisionFilter/TriangleEdgeCollisionFilter.cs b/src/Jitter2/Collision/CollisionFilter/TriangleEdgeCollisionFilter.cs index 986548e6..773f7d35 100644 --- a/src/Jitter2/Collision/CollisionFilter/TriangleEdgeCollisionFilter.cs +++ b/src/Jitter2/Collision/CollisionFilter/TriangleEdgeCollisionFilter.cs @@ -89,8 +89,6 @@ public bool Filter(RigidBodyShape shapeA, RigidBodyShape shapeB, if (c2) tnormal.Negate(); - if (JVector.Dot(normal, tnormal) < -cosAT) normal.Negate(); - tshape.GetWorldVertices(out JVector a, out JVector b, out JVector c); JVector n, pma; @@ -162,7 +160,6 @@ public bool Filter(RigidBodyShape shapeA, RigidBodyShape shapeB, } penetration *= f5; - normal = nnormal; } else { @@ -176,7 +173,6 @@ public bool Filter(RigidBodyShape shapeA, RigidBodyShape shapeB, } penetration *= f6; - normal = tnormal; } return true; diff --git a/src/JitterDemo/Playground.cs b/src/JitterDemo/Playground.cs index 8102fa2c..6957c2a4 100644 --- a/src/JitterDemo/Playground.cs +++ b/src/JitterDemo/Playground.cs @@ -115,7 +115,8 @@ public void ShootPrimitive() sb.Position = Conversion.ToJitterVector(pos); sb.Velocity = Conversion.ToJitterVector(dir * primitiveVelocity); - var ss = new BoxShape(1); + + var ss = new SphereShape(0.5f); sb.AddShape(ss); } @@ -226,6 +227,13 @@ void DrawShape(Shape shape, in Matrix4 mat, in Vector3 color) if (!GuiRenderer.WantsCaptureKeyboard && Keyboard.KeyPressBegin(Keyboard.Key.Space)) { + /* + Camera.Position = new(-28.477571f, 6.2047358f, -6.972821f); + Camera.Direction = new(-0.51022285f, -0.36347938f, 0.7794584f); + Console.WriteLine(this.Camera.Position); + Console.WriteLine(this.Camera.Direction); + */ + ShootPrimitive(); }