2D triggers and collisions

I’m messing around with 2D physics in Unity and I’m encountering a problem I haven’t come across before (I’m still fairly new to unity). If I have two 2D trigger colliders, a collision between them won’t register unless one of them also has a Rigidbody2D. I have no idea why.

Can anyone shed some light?

What you are trying to do? Get a collision between two triggers and do something when it happens?

I think I may have figured it out. It might be because I’m moving a static collider? What I’ve been reading suggests moving a static collider can lead to incorrect physics calculations. I’m not sure why, but that’s what I’ve read.

Yes, that’s true.

When you have static objects, unity doesn’t calculate its bounds every frame, because it means that the game object will not move.

Don’t use static for objects that you want move and avoid these problems of collisions.

1 Like

Thanks for the explanation. Much appreciated.

1 Like