Given a ray in a 2D world at position p with initial velocity u and acceleration a how can I tell when it's within a certain distance r from a certain point.
Tell me more
×
Game Development Stack Exchange is a question and answer site for
professional and independent game developers. It's 100% free, no registration required.
|
Uniform motion: s = ut + at^2/2 Or p(t) - p(0) = ut + at^2 / 2 You want the first t >= 0 for which (p(t) - C).(p(t) - C) = r^2. If u and a could be non-perpendicular then I think you have to solve a quartic. |
|||||
|