I just learnt an important lesson: If I want a collider to react with a trigger+rigidbody, the rigidbody has to move to cause any effect. If trigger+rigidbody are on a static object, the colliders run right through it without a beep…
Triggers and Colliders are a bit weird…
2 Triggers with no rigidbody don’t do anything at all.
Same goes for 2 Colliders with no rigidbody involved.
2 Colliders where one has a rigidbody attached will cause a Collision.
1 Collider+Rigidbody and 1 Trigger will cause a Trigger.
1 Trigger+Rigidbody and 1 Collider will also cause a Trigger.
1 Trigger+Rigidbody and a second Trigger will again cause a Trigger.
It doesn’t matter if the rigidbody uses gravity or is kinematic, BUT in all these cases the effect will only be there if the object with the rigidbody is moving…
2 Comments
just to mention it once more: If the rigidbody doesn't move, there's not going to be a collision!
So if you move a Trigger into a static rigidbody with a collider, nothing will happen. (A very crude workaround would be to add a script to the rigidbody that rotates it by 0.000001 degree each frame… Yes, very crude… as I said…)
Thanks for the info. Had problems with my triggers today. I tried your approach and rotated the trigger witch was standing still. However the trigger event will only accrue now and then. Is this something you have experienced as well?
Michael