Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#ActualEWClay

Posted 18 January 2013 - 04:51 AM

3. Yes, you should test the min and max on each axis for overlap. No overlap on any axis = no collision. (This is the Separating Axis Theorem, which you might want to look up.) As a bonus, the smallest overlap identifies the most useful axis to take for the collision normal.

4. Yes, but you might want to call it with the indices of the colliding pair, not always 0 and 1.

The only strategy I would recommend at this point would be iterative impulses. You need a list of colliding pairs, which you have, but it would be good to do the overlap test before adding them.

The problem generally is that solving a collision for one pair will affect the solution for another pair. So you have to revisit the collisions multiple times and repeat the calculations until every pair is heading apart.

Get it working perfectly for two bodies, then try for more. Good luck, this stuff isn't easy.

#1EWClay

Posted 18 January 2013 - 03:42 AM

3. Yes, you should test the min and max on each axis for overlap. No overlap on any axis = no collision. (This is the Separating Axis Theorem, which you might want to look up.) As a bonus, the biggest overlap identifies the most useful axis to take for the collision normal.

4. Yes, but you might want to call it with the indices of the colliding pair, not always 0 and 1.

The only strategy I would recommend at this point would be iterative impulses. You need a list of colliding pairs, which you have, but it would be good to do the overlap test before adding them.

The problem generally is that solving a collision for one pair will affect the solution for another pair. So you have to revisit the collisions multiple times and repeat the calculations until every pair is heading apart.

Get it working perfectly for two bodies, then try for more. Good luck, this stuff isn't easy.

PARTNERS