• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[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?
 
Level 23
Joined
Feb 6, 2014
Messages
2,466
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.
Top