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

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -