Answers for "oncollisionenter"

16

unity oncollisionenter

void OnCollisionEnter(Collision col)
    {
		//This method will run when your game object
      	//collides with something

      	Debug.Log("Collided");
    }
Posted by: Guest on February-15-2020
1

oncollisionenter

private void OnCollisionEnter()
{

}
Posted by: Guest on July-07-2021
1

oncollisionenter

void OnCollisionEnter(Collision collision)//Make sure to put this out of Voids
    {
        if (other.gameObject.tag == "Object") 
         {
             Debug.Log ("Collided");
         }
    }
Posted by: Guest on February-22-2021

Browse Popular Code Answers by Language