- Home /
Does the "Layer Collision Matrix" affect triggers?
I can't see this documented anywhere, and as far as I can see, it doesn't. Am I missing something? A checkbox somewhere?
I'm using it so that only objects on a particular layer can activate a trigger. I'm aware that I could do a layer check in onTriggerEnter(), but don't think it should be needed, since it should only detect trigger entry by object on that layer.
Right now, it ignores the matrix. Is this expected behaviour?
Answer by Tepei · May 22, 2015 at 10:41 AM
I do a test in 2D and the Triggers works fine for me with the collision Matrix. But you need at least one rigidbody in one of the object to make the trigger works.
This is in 3D, although it shouldn't make any difference. The problem is that the trigger IS activated, despite the fact that the two layers are set to not interact.
Wait, I need rigidbody? Collider is not enough?
I don't know why !) And don't like it so much.. But you could set your rigidbody to $$anonymous$$inematic if you don't want it affected by physic. I just leave my decor with no rigidbody But every Character and Projectile have one.