Simple Unit facing

Status
Not open for further replies.
Level 7
Joined
May 18, 2010
Messages
264
I cant remember how to Check where is unit facing

  • Unit - Create 1 Memory Egg Sack for (Owner of (Triggering unit)) at ((Position of (Triggering unit)) offset by 150.00 towards (1.00 + 1.00) degrees) facing Default building facing (270.0) degrees
Offset by 150
then i need to 1.00 to be the FACING of unit :EX: (up) +or- 180 to make it
behind the unit so it looks like it poop the eeg not spit it out...
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
constant native GetUnitFacing takes unit whichUnit returns real
Returns the current facing angle of a unit.
whichUnit is the unit you want the facing of.
returns the facing of the unit in degrees as a real.

Be aware that it returns the angle in degrees. Most functions in WC3 utalize radians so you may need to convert it.
A radian is a linear scale which converts as follows.
0 degrees = 0 radians
180 degrees = pi radians

thus
degrees * pi / 180 = radians
radians * 180 / pi = degrees
 
Level 7
Joined
May 18, 2010
Messages
264
Returns the current facing angle of a unit.
whichUnit is the unit you want the facing of.
returns the facing of the unit in degrees as a real.

Be aware that it returns the angle in degrees. Most functions in WC3 utalize radians so you may need to convert it.
A radian is a linear scale which converts as follows.
0 degrees = 0 radians
180 degrees = pi radians

thus
degrees * pi / 180 = radians
radians * 180 / pi = degrees

Aha that means radians can pee degrees ? :D
i get what u meant aniway.
Edit: ofc rep+ all thx on help i dont know how to close btw...
 
Status
Not open for further replies.
Top