Closed holke closed 4 years ago
I just had the idea to create a gameobject with multiple circle Colliders. The circle colliders define the non-spawnable space. We can then attach a script to this object that gets a point and checks whether this point is inside any of the colliders. If so it returns false.
Thus a smiley creation routine can determine random coordinates, then ask this script if they are ok and if not start over again.
I think we must take circle colliders because otherwise an IsInsideCollider function is hard to get.
We need something to restrict the spawnable space for smileys. Example: In the hospital level, we do not want smileys to spawn inside the hospital.
A solution should be modular and easily applicable for all levels.