Hey,
I was just wondering how I could set a game object to watch for collisions between 4 different prefabs - all of which have the same tag.
Thanks very much.
Hey,
I was just wondering how I could set a game object to watch for collisions between 4 different prefabs - all of which have the same tag.
Thanks very much.
I know I would use GameObject.FindGameObjectsWithTag but I’m no sure how to put this together especially as the number of objects with that tag keep getting increased.
Try naming them with a suffix to differentiate…prefab00, prefab01, prefab02 etc… Set an OnCollisionEnter function on them to send the collider and collidee name to the master GO and deal with whatever interactions you want from that script.
HTH
BTH