fix: fixed an issue where when there is an inactive collider in the universe messing up the physics engine

This commit is contained in:
2025-05-27 13:52:53 +03:00
parent d3fb612904
commit 4213b3f8b5
2 changed files with 4 additions and 4 deletions

View File

@@ -57,14 +57,14 @@ public class PhysicsEngine2DStandalone : IPhysicsEngine2D
{
ICollider2D? colliderX = colliders[x];
if (!colliderX.IsActive)
return;
continue;
for (int y = x + 1; y < colliders.Count; y++)
{
ICollider2D? colliderY = colliders[y];
if (!colliderY.IsActive)
return;
continue;
if (colliderX.RigidBody2D == colliderY.RigidBody2D)
continue;