• 🏆 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!

[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