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

Turn unit in Z axis.

Status
Not open for further replies.
Level 11
Joined
Feb 22, 2006
Messages
752
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

  • dummy.mdx
    34.2 KB · Views: 90
Level 10
Joined
Jun 1, 2008
Messages
485
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.
Top