Collision resolution with an SAT based method

Started by
2 comments, last by makuto 12 years ago
Hello. I have successfully implemented a separating axis theorem-based collision detection function. My problem is with resolving the collision. By following this tutorial,
http://www.metanetsoftware.com/technique/tutorialA.html
he says that all I have to do is resolve the collision using the axis with the shortest possible resolution vector. This doesn't work at all when the objects near each other's corners, because the vector on the other side of the corner (the incorrect vector) will be shorter, making the object tunnel through the corner. I've done 3 multisampled levels on a slower-moving object, and it still tunnels straight through.
I have tried a key-based system where if the object travels up, it will resolve down. This works except when it comes to diagonals. I use the square of 2 as a 45 degree angle for the resolution axis, but the object ends up traveling too far in order to resolve the collision.
What is a good collision resolution technique that I can use to solve the collisions?

Want to get to know my work and I better? See my website: Au 79 Games

I wrote General Tips on the Process of Solo Game Development

Advertisement
Should I move this to a different board?

Want to get to know my work and I better? See my website: Au 79 Games

I wrote General Tips on the Process of Solo Game Development

All discrete methods will be subject to tunneling. There's no way around it. When it comes to physics libraries (Bullet in particular), they prevent this by internal sub-steps or by having a threshold over which they enable sweeping - continuous collision. This involves Minowski sums as far as I've understood and let me tell you they are a world of phun.
So in general, it appears no algorithm solves the high-speed case natively (whatever high-speed means to you).

I'm probably pissing off quite some people but... look at a physics library for doing the work for you.

Previously "Krohm"

Thanks for the response. I think I will try something like the object's centers at the beginning of the frame are compared to the static object's normals, then the closest normal to the line will be used.
Performance matters, but right now I'm just coding it to be fairly versatile and to work, as well as for a learning experience (which is the main reason why I don't use a lib).

Want to get to know my work and I better? See my website: Au 79 Games

I wrote General Tips on the Process of Solo Game Development

This topic is closed to new replies.

Advertisement