Public Group

Collision resolution with an SAT based method

This topic is 2343 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

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?

Share on other sites
Should I move this to a different board?

Share on other sites
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.

Share on other sites
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).

1. 1
2. 2
3. 3
Rutin
18
4. 4
JoeJ
12
5. 5

• 14
• 9
• 22
• 9
• 31
• Forum Statistics

• Total Topics
632618
• Total Posts
3007485
• Who's Online (See full list)

There are no registered users currently online

×