Answers for "unity manually check collision"

C#
8

how to detect collision in unity

void OnCollisionEnter(Collision collision)
{
	if(collision.gameObject.tag == "yourNameOfObject")
    {
    	//This is example
        Debug.Log("Hit Object");
        //code your thing here
    }
}
Posted by: Guest on August-03-2021

C# Answers by Framework

Browse Popular Code Answers by Language