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)
|
if (bothCollidersAreTriggers)
|
||||||
continue;
|
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 (collisionDetector.TryDetect(colliderX, colliderY, out CollisionDetectionInformation information))
|
||||||
{
|
{
|
||||||
if (colliderX.IsTrigger)
|
if (colliderX.IsTrigger)
|
||||||
|
|
Loading…
Reference in New Issue