문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top