Skip to content

Instantly share code, notes, and snippets.

@phoenixperry
Created October 8, 2013 18:12
Show Gist options
  • Save phoenixperry/6888982 to your computer and use it in GitHub Desktop.
Save phoenixperry/6888982 to your computer and use it in GitHub Desktop.
void OnCollisionEnter(Collision theCollision){
if(theCollision.gameObject.name == "Floor"){
Debug.Log("Hit the floor");
}else if(theCollision.gameObject.name == "Wall"){
Debug.Log("Hit the wall");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment