Skip to content

Instantly share code, notes, and snippets.

@moon-goon
Created January 23, 2016 01:37
Show Gist options
  • Save moon-goon/1a2feeea285ddac99426 to your computer and use it in GitHub Desktop.
Save moon-goon/1a2feeea285ddac99426 to your computer and use it in GitHub Desktop.
void OnCollisionExit(Collision collisionInfo) {
// not calling collisionInfo at this time but we can get the additional information using
// for example: collisionInfo.transform.name
// change player's color to red when collision is ended (not touching each other)
gameObject.GetComponent<Renderer>().material.color = Color.red;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment