Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.