# [Solved] Parabolic movement

Discussion in 'World Editor Help Zone' started by HerlySQR, Nov 5, 2020.

Tags:
1. ### HerlySQR

Joined:
Jun 26, 2020
Messages:
725
Resources:
0
Resources:
0
Can you tell me how can I make a unit go up and then down (the unit is already a flying unit) and the trajectory was a parabola?

Joined:
Jun 26, 2020
Messages:
725
Resources:
0
Resources:
0
3. ### pr114

Joined:
Mar 26, 2017
Messages:
261
Resources:
0
Resources:
0
You add a base speed, and each time interval that base speed is reduced.

See this example. f means the flying height and t is the time that has passed.
I use time intervals of .03 sec for a smooth visual.

Meaning the first .03 time interval the flying height is boosted by 90, next interval +84 etc.

Code (Lua):
f = f+90-(t*6)
SetUnitFlyHeight(u, f, 9999)

4. ### HerlySQR

Joined:
Jun 26, 2020
Messages:
725
Resources:
0
Resources:
0
Ok, but I also wanna the height depends of the horizontal distance the unit will travel.

Joined:
Feb 5, 2018
Messages:
380
Resources:
0
Resources:
0
There are at least hundred jump spells and/or systems in the spells section.

6. ### HerlySQR

Joined:
Jun 26, 2020
Messages:
725
Resources:
0
Resources:
0
Yes, you are right, but I have a problem, my unit when lands it has to be removed in that exact moment and do some actions, so How can I detect if the trigger that moves finish its work?, Using a confirmer no because that removes the unit before the periodic trigger ends, or Am I doing something wrong?

Joined:
Jun 26, 2020
Messages:
725
Resources:
0
Resources:
0