I'm playing around a bit and trying to get some things to work for a later project, but I have a problem that I can't seem to find a solution to.
Right now I have working and accurate collision detection, but the problem is creating the physics. The physics are simple right now, an object has a vector for it's direction and speed, when there is a collision the vector is inverted.
The problem is that when objects collide they get shoved into each other and end up inverting the vector forever causing strange results. E.g. magically floating upwards, or appearing to ignore the physics entirely.
Could anyone help me out?
EDIT: Detection is done by separating axis theorem and I didn't put code because all that really goes on is there is a loop to check for collisions, when one is found the vectors are inverted. Like I said, the actual detection works fine, I think my problem is as Sibbo said with moving the objects so they don't collide anymore.