as the title says, how do i make it so that when an object spawns, it doesn't spawn on top of another object?
edit: just to clarify, in my game, whenever the character sprite comes in contact with the object item that it collects, the item's position is set to another area randomly (basically kinda like the game snake). i want to make it so that when the item randomly spawns, it doesn't spawn on top of the character sprite because the collision polygons don't collide and there's this awkward moment where you have to move the character off the item and then collide it with the item again to collect it.