• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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