0
\$\begingroup\$

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).

\$\endgroup\$

1 Answer 1

-1
\$\begingroup\$

The answer is Separate Axis Theorem

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

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .