So, I have some circles which I want to bounce from the edge of the map (i.e. rectangle) but they should not bounce from each other.
Problem is, I still need to capture circle-circle collisions and perform some task on such events.
Can anyone point me the direction I should go?
For clarification:
I am using libGDX and Box2D, circles are DynamicBodies. In the middle of the map there might be some static bodies, which circles should also normally colide with (bounce from them).
What I tried is to set restitution to 0 for both circles at the beginning of contact and restore restitution at the end of the contact (in my ContactListener subclass). Also tried temporary set circles to be sensors. Am not sure why it didn't work, though.