From 28692a5a6ff52d0b8b38f63a71edd4c5ca6035ea Mon Sep 17 00:00:00 2001 From: JammieCat Date: Tue, 13 Jun 2023 17:10:44 +0100 Subject: [PATCH] add bug fix when sensor collides with a non-sensor A sensor body colliding with a non-sensor body will impact the velocity of the sensor body. This is a bug fix for that. --- src/box2dx/Box2D.NetStandard/Dynamics/World.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/box2dx/Box2D.NetStandard/Dynamics/World.cs b/src/box2dx/Box2D.NetStandard/Dynamics/World.cs index 3debd38..31821c8 100644 --- a/src/box2dx/Box2D.NetStandard/Dynamics/World.cs +++ b/src/box2dx/Box2D.NetStandard/Dynamics/World.cs @@ -910,7 +910,7 @@ private void SolveTOI(TimeStep step) for (Contact c = _contactList; c != null; c = c._next) { - if ((int)(c._flags & (Contact.CollisionFlags.Slow | Contact.CollisionFlags.NonSolid)) == 1) + if ((int)(c._flags & (Contact.CollisionFlags.Slow | Contact.CollisionFlags.NonSolid)) != 0) { continue; }