• 🏆 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!

[Spell] Parabola/Arc Equation

Status
Not open for further replies.
Level 10
Joined
Jun 6, 2007
Messages
392
I don't know what exactly you are looking for, but this is a function I made to use in my spells which require some parabola. It takes dist, which is the (x)distance between roots, height which is the max height of the parabola, and x value, and returns z value.

If you use this function for a missile, just give it the distance that the missile has travelled as x-value, and set the height of a missile to return value.

JASS:
function Parabola takes real dist, real height, real x returns real
    local real a = 4*height/dist
    return a*x*(-x/(dist)+1)
endfunction
 
Status
Not open for further replies.
Top