Hey
I have an enemy with 3 colliders, 2 to detect if the emeny is hit, and 1 to detect if it move into something, before it hit it.
In the OnTriggerEnter i can get which collider the hole enemy hit, but is there a way to find out which of the 3 colliders in the enemy there hit the other object?
You can check for the collider type inside OnTriggerEnter():
if(collider == BoxCollider || collider == SphereCollider)
if i write this:
void OnTriggerEnter(Collider collsionObject)
{
Debug.Log(collsionObject.tag);
}
So will it print the tag of the collider my enemy hit, but i want to know what collider in my enemy theres hits the other object