I am currently working on adding an “endless mode” to my game. There is an object on the map (loaded with ponytiled) that moves to a random position any time the player collides with it. However, sometimes the random position embeds it in a map object. How would I go about checking for this so I can move it to a different position? I can’t use the x and y of the objects by themselves because some of the objects are too long.
Thanks in advance for your help!