Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would think this is a common issue, but I couldn't find an answer that helped me. Help would be appreciated.

In my game I have rectangular objects. They have rotating bounding box, aka not AABB but boxes that rotate with the entity and always match it's exact shape (I think it's called OBB).

When two objects collide, they often penetrate each other a little:

enter image description here

My question is, how can I move the objects out of each other? (Before performing the 'actual' collision handling, i.e. setting velocities etc).

share|improve this question

The answer is Separate Axis Theorem

Besides detecting collision, with SAT you can easily get the penetration vector and set the velocities with it

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.