• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[General] If a non-flying unit is on a slope, how to accurately get his Z coordinate?

Status
Not open for further replies.
Level 11
Joined
Oct 11, 2012
Messages
711
If a non-flying unit is on a slope, how to accurately get his Z coordinate?
I want to create a lightning falling downing from the sky on an enemy unit. If I use the flying height of the enemy unit, whose position is on a slope, as the Z coordinate, the lightning impact point on the enemy unit appears to be on the ground in front of such unit. The reason for this is because the unit height is zero, but the slope "makes"the unit's model to raise to a certain height, which cannot be detected by "GetUnitFlyHeight" and causes the seemly misalignment.
So what should I do? Is there a way to solve this problem? I do not want to create a dummy on the sky to cast Finger of Death to the enemy unit.
Thanks all.
 
Last edited:
Status
Not open for further replies.
Top