feat(physics): Engine Rigidbody2D Static Check
This commit is contained in:
parent
1ffddab2c1
commit
dc96b93024
|
@ -65,6 +65,10 @@ public class PhysicsEngine2D : IPhysicsEngine2D
|
|||
if (bothCollidersAreTriggers)
|
||||
continue;
|
||||
|
||||
bool bothCollidersAreStatic = colliderX.RigidBody2D?.IsStatic ?? true && colliderX.RigidBody2D?.IsStatic == colliderY.RigidBody2D?.IsStatic;
|
||||
if (bothCollidersAreStatic)
|
||||
continue;
|
||||
|
||||
if (collisionDetector.TryDetect(colliderX, colliderY, out CollisionDetectionInformation information))
|
||||
{
|
||||
if (colliderX.IsTrigger)
|
||||
|
|
Loading…
Reference in New Issue