I have a 3D map on which there are several identical keys that the player has to collect to unlock the door to a castle. Only when the player collects all keys will they be let into the castle. This part works, no problem.
I have a GUI navigation arrow that is able to point to a key on the map using WorldToScreenPoint. This part was a bit trickier, but it’s mostly working now.
My problem is: I want the navigation arrow to point to the next closest key on the map once the first key is collected, and continue doing this until all keys have been collected.
As it stands right now, the nav arrow stops functioning after the first key is collected and the game object is destroyed.
Does anyone have ideas on how to accomplish this? Is there a way to compute the closest of a set of game objects that all have the same tag?