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.
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.
Sign up using Google
Sign up using Facebook
Sign up using Stack Exchange
3 years ago