Turn unit in Z axis.

Status
Not open for further replies.
Use the model attached below.

It is not visible, but you can make it the model path of a unit and attach any special effect to its "origin" attachment point to simulate a model. To change its angle in the z direction, use the function SetUnitAnimationByIndex() and for the index input the angle (can only be an integer), between 0 and 180 degrees:

JASS:
    SetUnitAnimationByIndex(u, 180) // model is upside down
    SetUnitAnimationByIndex(u, 90) // model is facing straight up
 

Attachments

ok, thanks to all who help!!

hmm.... but, can i use something like this? is this will work?
  • Animation - Lock <Unit>'s Chest to face <Unit>, offset by (0.00, 0.00, 500.00)
With this, unit will lock to face itself with Z offset 500.
or can it be like this?
  • Animation - Lock <Unit>'s Chest to face <Unit 2>, offset by (0.00, 0.00, 0.00)
Unit will lock to face Unit 2 that have 500 flying height.
Is this will work? I never test it before.
 
Status
Not open for further replies.
Back
Top