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

Facing Angle

Status
Not open for further replies.
Level 12
Joined
Mar 13, 2012
Messages
1,121
Ok, countless hours were spent to come to the final conclusion that its just not possible. I tried everything that came to my mind, which was a lot..

Those turning functions can turn the unit instantly, the problem is that there will always be an animation of turning.

Best you can do is to transform your hero via this to a 0 ms unit, and then turn it like you would turn a building like this
JASS:
function SetImmovableUnitFacing takes unit u, real a returns nothing
    call SetUnitPosition(u, GetUnitX(u), GetUnitY(u))
    call SetUnitFacing(u, a)
endfunction

The backdraw of this method is that you have to wait ~0.5 seconds to transform your hero back to its original state, else you will see the parts of the turning animation.
 
Level 13
Joined
Oct 10, 2009
Messages
439
Eh, the way I remember working around this was using the "Unit custom value" or a hashtable to store the units implied facing angle, that way I could use it to calculate everything based off that angle.

I'm not sure if this is too relevant tho
 
Status
Not open for further replies.
Top