I am currently building a game about being on another planet and such…
Whenever the player is in a safezone, the player will be able to recharge the oxygen they are carrying around. I’ve got the safezone setup, but I only want it to be able to work whenever a oxygengenerator is inside of it.
Since the building in which the oxygen generator is able to stand in, is a prefab (just as the oxygen generator), I want to be able to my every safezone/building to check for themself if an oxygen generator is placed in the safezone/building.
How can I achieve this?
I might forgot to mention that the player is a seperate game object. The player is able to walk in and out of the safezone, though the generator cannot move when playing the game. (It can be build however).
I’ve tried using OnTriggerStay with a tag, but this is not working. By default, some zones already have some generators in them.