ive been trying to figure out how to create an object in a random location on the screen but a certain distance away from a central object.
this is what i have for random location. every 3 seconds i create an object at location: x = random(0,800) y = random(0,600)
that works great but i dont want them to appear within a certain area of the screen. this image may help to understand what i mean
the red square is my central object
the blue area represents the no-go zone (distance from object)
the green circles represent the random objects
i need the green circles to appear randomly anywhere on screen but not within a certain distance from the central object ie not inside the blue circle.
is there a formula for this?