[Solved] SetUnitFlyHeight not working with rate

Status
Not open for further replies.
Hi, I am using SetUnitFlyHeight in my Knockback 2D update, but I can't get it to work right. I wanted to avoid needing to update the height each iteration of the loop, so I adjusted the time frame for the unit to ascend to half the duration of the knockback. Problem is that the unit remains flat, no matter what the height is at.

It occurs to me that the unit is paused, but will that mess up the animation of the fly height? If so, I'll have to move it gradually using Moyack's parabolic function.

By the way, in projectile systems I see GetLocationZ. Will I need that in this knockback system to ensure the knockback is smooth?
 
The rate for this native is basicly just z-velocity: number of coordinate-units / second.

So if you want the unit to shift it's height from 0 to 500 in 1 second, set the rate to 500. If you want it to take two seconds, use 250.

Isn't that common knowledge already? The moment I saw rate I immediately thought wc3 coordinate unit/second.
 
Status
Not open for further replies.
Back
Top