Jump to content

  • Log In with Google      Sign In   
  • Create Account


Collision resolution with an SAT based method


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 makuto   Members   -  Reputation: 833

Like
0Likes
Like

Posted 23 April 2012 - 07:34 AM

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


Sponsor:

#2 makuto   Members   -  Reputation: 833

Like
0Likes
Like

Posted 23 April 2012 - 05:33 PM

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


#3 Krohm   Crossbones+   -  Reputation: 3064

Like
0Likes
Like

Posted 24 April 2012 - 12:16 AM

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.

#4 makuto   Members   -  Reputation: 833

Like
0Likes
Like

Posted 24 April 2012 - 06:46 AM

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





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS