Skip to main content
added 17 characters in body
Source Link
MindSeeker
  • 423
  • 1
  • 4
  • 16

Take parametric equations for the objects' motions and plug them into the distance formula (squaring both sides): distance formula squaredfor example, newxpos1 = (aa + txvel1w) for the objects' motions and plug them into the distance formula -(squaring both sides): distance formula squared = (ca + t(xvel2))^2 +w - (bc + tyvel1 -x))^2 + (db + ty - (yvel2d + t*z))^2. Remember, t is going to be negative. To find the time of collision for two circular objects we set the left side equal to (r+s)^2. Solving for t using the quadratic equation (and a great deal of very tedious algebra), we get the above "t=..." equation.

Take parametric equations for the objects' motions and plug them into the distance formula (squaring both sides): distance formula squared = (a + txvel1 - (c + t(xvel2))^2 + (b + tyvel1 - (d + t(yvel2))^2. Remember, t is going to be negative. To find the time of collision for two circular objects we set the left side equal to (r+s)^2. Solving for t using the quadratic equation (and a great deal of very tedious algebra), we get the above "t=..." equation.

Take parametric equations (for example, newxpos1 = a + tw) for the objects' motions and plug them into the distance formula (squaring both sides): distance formula squared = (a + tw - (c + tx))^2 + (b + ty - (d + t*z))^2. Remember, t is going to be negative. To find the time of collision for two circular objects we set the left side equal to (r+s)^2. Solving for t using the quadratic equation (and a great deal of very tedious algebra), we get the above "t=..." equation.

Rollback to Revision 12
Source Link
Nathan Reed
  • 33.7k
  • 3
  • 93
  • 116

ANSWERED: Small, High-Speed Object Collisions: Avoiding Tunneling

FINAL EDIT/UPDATE: Answered, see my answer below.

EDIT/UPDATE: My biggest question right now is whether step 3's "t=..." equation is a good idea or there a better way to do it. Most other issues have been partially or fully addressed, but no comments or answers have really touched on this issue. Again, an analytic solution is probably required, the velocities and distances are too large, and the objects are too small, for any iterative/recursive solution (a few are suggested below in the comments) that I can think of (although if there is a special iterative/recursive solution that will handle these kinds of situations fine then I'm definitely open to it). Thank you very much for your help so far, you all are awesome and I really appreciate your thoughts and help!

ANSWERED: Small, High-Speed Object Collisions: Avoiding Tunneling

FINAL EDIT/UPDATE: Answered, see my answer below.

EDIT/UPDATE: My biggest question right now is whether step 3's "t=..." equation is a good idea or there a better way to do it. Most other issues have been partially or fully addressed, but no comments or answers have really touched on this issue. Again, an analytic solution is probably required, the velocities and distances are too large, and the objects are too small, for any iterative/recursive solution (a few are suggested below in the comments) that I can think of (although if there is a special iterative/recursive solution that will handle these kinds of situations fine then I'm definitely open to it). Thank you very much for your help so far, you all are awesome and I really appreciate your thoughts and help!

Small, High-Speed Object Collisions: Avoiding Tunneling

EDIT/UPDATE: My biggest question right now is whether step 3's "t=..." equation is a good idea or there a better way to do it. Most other issues have been partially or fully addressed, but no comments or answers have really touched on this issue. Again, an analytic solution is probably required, the velocities and distances are too large, and the objects are too small, for any iterative/recursive solution (a few are suggested below in the comments) that I can think of (although if there is a special iterative/recursive solution that will handle these kinds of situations fine then I'm definitely open to it). Thank you very much for your help so far, you all are awesome and I really appreciate your thoughts and help!

added 57 characters in body; edited title
Source Link
MindSeeker
  • 423
  • 1
  • 4
  • 16

ANSWERED: Small, High-Speed Object Collisions: Avoiding Tunneling

FINAL EDIT/UPDATE: Answered, see my answer below.

EDIT/UPDATE: My biggest question right now is whether step 3's "t=..." equation is a good idea or there a better way to do it. Most other issues have been partially or fully addressed, but no comments or answers have really touched on this issue. Again, an analytic solution is probably required, the velocities and distances are too large, and the objects are too small, for any iterative/recursive solution (a few are suggested below in the comments) that I can think of (although if there is a special iterative/recursive solution that will handle these kinds of situations fine then I'm definitely open to it). Thank you very much for your help so far, you all are awesome and I really appreciate your thoughts and help!

Small, High-Speed Object Collisions: Avoiding Tunneling

EDIT/UPDATE: My biggest question right now is whether step 3's "t=..." equation is a good idea or there a better way to do it. Most other issues have been partially or fully addressed, but no comments or answers have really touched on this issue. Again, an analytic solution is probably required, the velocities and distances are too large, and the objects are too small, for any iterative/recursive solution (a few are suggested below in the comments) that I can think of (although if there is a special iterative/recursive solution that will handle these kinds of situations fine then I'm definitely open to it). Thank you very much for your help so far, you all are awesome and I really appreciate your thoughts and help!

ANSWERED: Small, High-Speed Object Collisions: Avoiding Tunneling

FINAL EDIT/UPDATE: Answered, see my answer below.

EDIT/UPDATE: My biggest question right now is whether step 3's "t=..." equation is a good idea or there a better way to do it. Most other issues have been partially or fully addressed, but no comments or answers have really touched on this issue. Again, an analytic solution is probably required, the velocities and distances are too large, and the objects are too small, for any iterative/recursive solution (a few are suggested below in the comments) that I can think of (although if there is a special iterative/recursive solution that will handle these kinds of situations fine then I'm definitely open to it). Thank you very much for your help so far, you all are awesome and I really appreciate your thoughts and help!

Tweeted twitter.com/#!/StackGameDev/status/381751573069987840
added 1449 characters in body
Source Link
MindSeeker
  • 423
  • 1
  • 4
  • 16
Loading
added 122 characters in body; Post Made Community Wiki
Source Link
MindSeeker
  • 423
  • 1
  • 4
  • 16
Loading
deleted 76 characters in body
Source Link
MindSeeker
  • 423
  • 1
  • 4
  • 16
Loading
added 1 characters in body
Source Link
MindSeeker
  • 423
  • 1
  • 4
  • 16
Loading
added 2 characters in body
Source Link
MindSeeker
  • 423
  • 1
  • 4
  • 16
Loading
added 4 characters in body
Source Link
MindSeeker
  • 423
  • 1
  • 4
  • 16
Loading
added 355 characters in body
Source Link
MindSeeker
  • 423
  • 1
  • 4
  • 16
Loading
edited body
Source Link
MindSeeker
  • 423
  • 1
  • 4
  • 16
Loading
added 6 characters in body
Source Link
MindSeeker
  • 423
  • 1
  • 4
  • 16
Loading
added 20 characters in body
Source Link
MindSeeker
  • 423
  • 1
  • 4
  • 16
Loading
added 20 characters in body
Source Link
MindSeeker
  • 423
  • 1
  • 4
  • 16
Loading
Source Link
MindSeeker
  • 423
  • 1
  • 4
  • 16
Loading