Hello,
I have the problem that I don“t know how to teleport an object, if it intersects an other object, at the top of the object. I have a lot of objects and I want to ask if there is a way without knowing the height of the intersecting object.
setLocation(obj.getX(), obj.getY() - (getImage().getHeight() + obj.getImage().getHeight())/2);