Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(3 edits) (+1)

So you want to detect if both tags are colliding with a specific object?


If that is want you want, you could add a script to that specific object and add a OnCollisionEnter or OnTriggerEnter (2D or 3D, depending on what you want to do), and check for both tags. 

I'd recommend creating two bools: one for a, and one for b, and then setting them on when they collide with the object.

Then in Update() add an if that checks if both bools are on, and then do what you want to do when those 2 objects collide with the specificobject.


Hope this helps!

EDIT: Also, OnTrigger is for colliders with "Is Trigger" on, and OnCollision is for coliders with "Is Trigger" off.

You have Enter, Stay, and Exit which I think are pretty self-explanatory, but just in case:

(the object = object that the script is attached to)

Enter: Used to detect when a object collides with the object.

Stay: Used to detect if an object is still collisioning with the object.

Exit: Used to detect when an object stops colliding with the object.

(+1)

Thanks, this is what I wanted!

No problem!