• 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.

[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