- Home /
Can more than one colliders be used for different purposes..????
In my scene I have got a GameObject which has a box trigger collider to act as a boundary for the playable area and destroy any gameobject which exits the collider ..... whereas I have added few more box trigger colliders in the same Gameobject to detect if the player gameobject passes through it or not... The question is how to differentiate between these colliders ... .. I mean how to know which collider is being hit ... (I don't mean ,which gameobject is hitting but which collider ,the player is hitting and get a reference to it)..
Thanks in Advance...
Answer by kingcoyote · Jul 06, 2016 at 06:03 PM
Colliders can exist on different layers and you can specify how these layers interact with each other in the Physics settings. You can read more in the Unity Manual here: https://docs.unity3d.com/Manual/LayerBasedCollision.html.
Your answer
Follow this Question
Related Questions
What other reasons would a 2D collider not make contact with another 1 Answer
Gameobject not detecting collison from other Box Collider 2D [SOLVED?] 2 Answers
OnTriggerEnter2D being called by GameObject without the trigger 1 Answer
Draw line within bounds of circular collider 0 Answers
Setting a Prefab Clone as the Child of another Object on Collision (2D) 1 Answer