OnTriggerEnter for specific trigger?

Hello,
is there a way to check if a specific trigger is triggered?
For example I have a quite big sphere collider around my character which is a trigger, but there are also other triggers on the same character. Now, as you can imagine, OnTriggerEnter() is called more than once, because its the same gameObject, but different triggers. The question is how to modify it to work for only the one, specific sphere trigger and NOT all triggers attached to the player gameObject.

Is this possible so far? Am I overlooking something? I dont know and I’d really appreciate help…

Sincerely,
Fabian

You should put each trigger on it’s own child GameOject. Then each object can have OnTriggerEnter() called separately.

In Unity, it is generally discouraged to have more than one Collider on a GameObject.

1 Like