prevent from overlap?

I have 2 static physics objects in a scene.

1 of them gets moved by changing the object x and y.

while doing so, it can overlap with the other static object, but this is unwanted.

what is a good way to prevent that, i.e. change the object´s x and y but keeping it outside area of the other object? [import]uid: 109677 topic_id: 21624 reply_id: 321624[/import]

Check for the co-ordinates and move the second one like magnets repelling each other, i.e. calculate the overlap x and y and then move the object2 by that over lap or push object 1 by that amount, so they will not overlap (like a bounce off an object) [import]uid: 3826 topic_id: 21624 reply_id: 85782[/import]

thanks for the input! (I had tried with screen coordinates but that was not useful). I was wondering if there is any physics trick that would take care of it automatically, but I guess that interferes with specifying x and y for a static object?
[import]uid: 109677 topic_id: 21624 reply_id: 85816[/import]