As Adiktuz said he has to convert it to 3d. Its fairly simple:
- For y you use z (in wc3 coordinates z always denotes the height)
- Instead of x you use the distance in the x/y plane, which is a 2d vector.
Lets say your projectile starts at (px, py, pz) and your target is at (tx, ty, tz). Then the distance on the x/y plane is d = (dx, dy) = (tx-px, ty-py).
To use this distance with the formula i posted you can just calculate the length of d (using the normal L2 norm):
|d| = sqrt(dx^2 + dy^2)
Calculate a:
a = height/|d|^2
which is equal to:
a = heigth/(dx^2 + dy^2)
The formula for the parabola:
z(x, y) = a*(x^2 + y^2)
However its probably easier to parametrize the whole thing, so instead of using a formula of the type z(x, y) we use three formulas, x(t), y(t), z(t) where t is the parameter of the time. Then the question is how to determine the missile speed.
1. You want constant missile speed, so higher distance = projectile takes more time to reach target
2. You want a fixed flying time for the missile, so higher distance = faster missile
Tell me if its 1. or 2. and i can provide jass code.