If a object is touching another, do something.

How do I make an object use a script, or a function, while another object is colliding with it? In my case I mean a snowboard-like object colliding with the terrain.

Thank You :smiley:

You have to tag the ground with something in the Navigator… such as “Ground” used in this example. Attach this to the snowboard.

function OnCollisionEnter(theCollision : Collision){
     if(theCollision.gameObject.tag == "Ground"){
	//Do this