• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Projectile arc on hill

Status
Not open for further replies.
Level 13
Joined
Mar 29, 2012
Messages
530
I have this missile (special effect), arc-projected to a point on the air. I'll just combine the target location z with the target height. I used this parabola function:
JASS:
function Parabola takes real h, real d, real x returns real
    return (4.00 * h / d) * (d - x) * (x / d)
 
    // 'h' is the max height
    // 'd' is the distance to target (max distance)
    // 'x' is the currently traveled distance at the time when it is iterated
endfunction

But the missile will just aim the ground. And I can't figure out the walk-around.
Any suggestion or help?

The missile also won't fly by h above the target if the target is higher.
I aim to use a fixed move speed which are based on specific time and max height (configurable variables).

curve-on-hill.png
 
Last edited:
Status
Not open for further replies.
Top