My buggy but acceptable implementation of using the Separate Axis Theorem for convex rigid bodies.
The implementation works for any convex shape with rotation, as well as realistic impulses including angular impulse.
It only supports resolving a single collision point per collision so it doesn't work too well with Edge to Edge collision but that isn't that important for what I need it for.
@mbh95 My implementation was a little dodgy in how it got the details of the collision as it could only resolve one vertex for each collision. I basically did a loop through each vertex and the global position of the axis that gave the minimum translation vector and the vertex with the smallest distance to that axis would be the collision point, MOST of the time. It's not perfect but it works pretty well. If you have any luck with a better way of doing it I would be interested to hear from you!
conman42000 1 month ago
I've also implemented the Separating Axis Theorem (in java), but I don't even know where to begin for rotational collision response. If you (or someone else reading this) could point me to a book, online resource etc. that deals with rotational physics, or supply your source code, it would be much appreciated.
mbh95 1 month ago