how to make a on collision event in unity code example
Example: unity oncollisionenter
void OnCollisionEnter(Collision col)
{
//This method will run when your game object
//collides with something
Debug.Log("Collided");
}
void OnCollisionEnter(Collision col)
{
//This method will run when your game object
//collides with something
Debug.Log("Collided");
}