According to the Trigger message table here http://unity3d.com/support/documentation/Components/class-BoxCollider.html a Rigidbody with Trigger Collider should get an OnTriggerEnter message sent in all combinations. However, in my case this doesn't work.
I've got a non-kinetic rigidbody with a compound collider (many child objects, each with a trigger box collider). There is no collider on the parent rigidbody object. The rigidbody object passes another object in the scene, with a static box collider (non-trigger). The rigidbody object does not get any OnTriggerEnter message sent. However, I do get OnTriggerEnter message sent if I make the other object's collider a trigger as well.
Is this setup supposed to work?
asked May 25 '10 at 11:52 AM
As you said yourself, trigger messages are sent to the object with the collider, not to the Rigidbody - this is because unlike static colliders, triggers are not (AFAIK) treated as compound colliders, so you'll get enter/exit messages for each trigger. To get the messages on the Rigidbody, you could make a simple script to iterate the parent hierarchy, until it finds a Rigidbody, and send the message to that.
answered May 25 '10 at 12:53 PM
jonas echterhoff ♦♦