I need points for spawning enemies in my game.
Suppose I have a rectangle starting from (-50, -100) to (50, 100), how to get Vector2 coordinates of random points in that box perimeter?
I’ve tried choosing (random) a side first then get a random x or y axis in that line but that method feels so clunky and the results are bad, shorter sides have an equal chance to be choosen like the longer sides. (Makes the feeling of enemies more frequently spawns on the shorter sides)
Thanks for reading