• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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: 87
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