Is there a way to instnatiate gameobjects in Unity outside of a radius rather than inside? What I’m talking about is having gameobjects instantiate anywhere but the radius specified and that’s because I plan on having enemies instantiate around my player but a set distance away so that I don’t have any problems with the enemies instantiating in and killing the player immediately.
I found a unity question on this topic but I’m not 100% sure whether it’s what I’m looking for.
I’m open to checking out other methods as well, for example just being able to spawn enemies in at a set distance from the player would be nice. I know the equation I think for doing it from a set position but what I want to be able to do is have the enemy spawn at random directions.
Conceptually, you do actually want an outer boundary for spawning, because you probably don’t want objects spawning infinitely far away. So if the furthest an object should appear is 10m, that should be part of your formula. And if you don’t want them spawning within 2m, then you want that that be part of your formula.
So you want a random number between, say, 2 and 10.