- Home /
Question by
Travis 2 · Nov 15, 2010 at 03:01 AM ·
collisioncollideroncollisionenter
collision enter
how would i define a collision enter with any game object?
Comment
Answer by Bampf · Nov 15, 2010 at 04:18 AM
The manual page has example code for C#, JavaScript, and Boo. Put the code in a script on the object that's detecting collisions.
Note that "any" game object is limited to "all objects that have a collider component on them." If there's no collider, then no collision is detected. Also, the manual stipulates that one of the bodies must also have a rigidbody component.