OnCollisionExit is called when this collider/rigidbody has stopped touching another rigidbody/collider.
function OnCollisionExit(collisionInfo : Collision) { print("No longer in contact with " + collisionInfo.transform.name); }
using UnityEngine; using System.Collections; public class Example : MonoBehaviour { void OnCollisionExit(Collision collisionInfo) { print("No longer in contact with " + collisionInfo.transform.name); } }
import UnityEngine import System.Collections public class Example(MonoBehaviour): def OnCollisionExit(collisionInfo as Collision) as void: print(('No longer in contact with ' + collisionInfo.transform.name))