• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

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