unity3d - Calculating 2D parabolic trajectory for a projectile to hit a position -
i'm developing tower defense in 2d in unity.
i'm trying calculate parabola draw trajectory of projectiles fired tower in game. i've got position of tower , position of enemy - need algorithm calculates parabola hit enemy.
is there universal algorithm or kind of calculation?
assuming gravity no drag have:
where
- x, y displacement
- x_0, y_0 initial location
- u_x, u_y initial velocity
- g acceleration due gravity
- t time elapsed
Comments
Post a Comment