hello I want to know how to trigger something when only two specific objects colide. for example when the ball object hits the wall changes to red color and when it hits the floor it turns blue (just for example). any thoughts?
You should take a look at OnCollisionEnter
This script would be attached to your ball, and assumes you have a collider/rigidbody on both objects (and neither are kinematic). You'd also need to create tags for 'wall' and 'floor', and specify it on each object.
Finally, there are plenty of similar questions about OnCollisionEnter. In future, try searching around and having a go on your own first.
answered Sep 27 '10 at 08:25 AM