Answers for "unity c# on trigger enter with specific gameobject"

C#
3

unity c# on trigger enter with specific gameobject

void OnTriggerEnter(Collider other)
    {
        if(other.gameObject.name == "Object name") 
			//Object name is the name of the GameObject you want to check for collisions with.
        {
			//What you want to do on trigger enter
        }
    }
Posted by: Guest on August-06-2020

Code answers related to "unity c# on trigger enter with specific gameobject"

C# Answers by Framework

Browse Popular Code Answers by Language