Hey guys!
This is my first post here - woooo!
So I am working on an isometric RPG and am handling target acquisition for NPCs/creatures.
I thought about adding a dummy child EMPTY to all characters, called “faction”. This child would consist essentially only of its TAG (which would then be “allies”, “enemies”…), so that when an AI wants to select a new target, it does a FindGameObjectsWithTag and can search for the appropriate tag (e.g. “enemies”) and set the respective empty’s parent as the new target (WHICH enemy is finally chosen would depend on distance etc.) – is this a very bad idea? Performance would be important, as the target platform is mobile.
Are there any significantly better alternatives to this? Like keeping a list of characters in each faction, then going through that list?
Thanks so much & I hope you had a great Christmas!