fix: Physics Engine Not Resolving Static Objects Correctly
This commit is contained in:
parent
d7f0b76485
commit
9f522bdb66
|
@ -74,7 +74,7 @@ public class PhysicsEngine2D : IPhysicsEngine2D
|
|||
if (bothCollidersAreTriggers)
|
||||
continue;
|
||||
|
||||
bool bothCollidersAreStatic = colliderX.RigidBody2D?.IsStatic ?? true && colliderX.RigidBody2D?.IsStatic == colliderY.RigidBody2D?.IsStatic;
|
||||
bool bothCollidersAreStatic = (colliderX.RigidBody2D?.IsStatic ?? true) && (colliderY.RigidBody2D?.IsStatic ?? true);
|
||||
if (bothCollidersAreStatic)
|
||||
continue;
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ public class PhysicsEngine2DCollector : HierarchyObjectBase, IPhysicsEngine2D
|
|||
if (bothCollidersAreTriggers)
|
||||
continue;
|
||||
|
||||
bool bothCollidersAreStatic = colliderX.RigidBody2D?.IsStatic ?? true && colliderX.RigidBody2D?.IsStatic == colliderY.RigidBody2D?.IsStatic;
|
||||
bool bothCollidersAreStatic = (colliderX.RigidBody2D?.IsStatic ?? true) && (colliderY.RigidBody2D?.IsStatic ?? true);
|
||||
if (bothCollidersAreStatic)
|
||||
continue;
|
||||
|
||||
|
|
Loading…
Reference in New Issue