There’re 3 characters in my game.
So, I have three different graphics.
I have wrote my code on my Graphic:
void OnTriggerEnter(Collider OtherObject)
{
Debug.Log("HIT1");
if (OtherObject.tag == "Objects")
{
Debug.Log("Hit");
Debug.Log(gameObject.name);
}
}
When my characters collision with my objects the code is not work.
But if I grab my objects to touch my characters the code will work!
How's that happened?
Can anyone please help me?