1

Is there a known and standard algorithm for calculating the time of impact between a circle and a box? The only information I can find are tests determining whether a circle and a box are already colliding. I can't find anything that would allow me to have the projected vector of a ball's movement be used to calculate if a collision will occur.

Is time of impact not used for anything except raycasting?

All entities velocities, orientations, and rotations are static in the particular context I am in.

Brandon
  • 53
  • 5
  • This would depend on whether the direction/velocity/orientation of the objects was static or changing. If all three are static, then you could probably calculate the time when the first intersection occurs. However, in the general case, it's probably easier to just detect whether they are currently intersecting, which is why those are the tests you find... – twalberg Jun 02 '14 at 19:54
  • In my particular context, everything is static. I will note that, as well as submit an answer that I just found by asking around. – Brandon Jun 02 '14 at 19:59

1 Answers1

1

After asking around, the best way to do this seems to be computing the Minkowski difference between the two objects, and then raycasting from the origin of the circle, and calculating the time of impact (if it exists) with the new shape.

This has been described pretty thoroughly here.

Tanmay Patil
  • 6,882
  • 2
  • 25
  • 45
Brandon
  • 53
  • 5