Parabola Function

Gotham

New Member
Reaction score
7
I'm making a map where I need to move a missile like this:


I've done the actual movement part, but I need a function to calculate the height of the missile.

So I founded this function:
JASS:
function JumpParabola takes real dist, real maxdist,real curve returns real
    local real t = (dist*2)/maxdist-1
    return (-t*t+1)*(maxdist/curve)
endfunction

It calculates the height, starting from 0 and finishing in 0. But I want it to start from 155 and finish in 0, so I tought "using this function, I need to calculate a start point of the parabola, creating the missile at X dist, where the height is 155".
I'm not that good at maths, I understand trigonometrics and it's functions (sine, cosine, tangent, etc.), but I'm stuck here.

Can someone create a function or help me creating a function that calculates the dist variable knowing the height, the max distance and the curve?
(or, if you find it easier, a function that creates something that goes like that parabola function but starts at some height (155, but this number can change))

Thank you.
 
I'm making a map where I need to move a missile like this:


I've done the actual movement part, but I need a function to calculate the height of the missile.

So I founded this function:
JASS:
function JumpParabola takes real dist, real maxdist,real curve returns real
    local real t = (dist*2)/maxdist-1
    return (-t*t+1)*(maxdist/curve)
endfunction

It calculates the height, starting from 0 and finishing in 0. But I want it to start from 155 and finish in 0, so I tought "using this function, I need to calculate a start point of the parabola, creating the missile at X dist, where the height is 155".
I'm not that good at maths, I understand trigonometrics and it's functions (sine, cosine, tangent, etc.), but I'm stuck here.

Can someone create a function or help me creating a function that calculates the dist variable knowing the height, the max distance and the curve?
(or, if you find it easier, a function that creates something that goes like that parabola function but starts at some height (155, but this number can change))

Thank you.

Its not that bad, since it is a parabolic curve you can cut it down the middle and they are the exact same on both sides. So think of the starting point you want as already like 30% through the entire curve. You just need to find the theoretical starting point where the trajectory passes through the point you want.

Its not too bad, I think Vexorian's Caster system has something like this build in it already. Some collision missle and I think you can specify the arc and Z starting location.
 
CS said:
Collision Missiles are projectiles, but they don't use parabolic movement, they have collision and you can detect when the projectiles hit an unit, and you can also destroy Collision Missiles when you need to.
:(
They use a fixed arc... I think I'll do the same way (parabolic movement looks awesome but has it's limitations, like a minimum range).
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top