• 🏆 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!

Flying unit falls when attacking

Status
Not open for further replies.
Level 3
Joined
Jan 2, 2015
Messages
15
Hi! I've been off mapping for quite a long time and now that I've come back to it I'm having a little issue.

I have a spell where I create 3 units that basically float around the hero. Those units are flying and, in this case, about 350 height. The movements of these units are made with a trigger so that they can basically attack while moving behind the hero.
Now, my issue is that whenever these units attack they kinda "fall". Basically, they suddenly lose height, dropping for a millisecond before getting back to their normal height. It doesn't impact the spell in itself, everything else is fine and it doesn't seem to bring any other problems, but I'm just kinda annoyed by these sudden drops, they seem weird and since everything else is going smoothly, it just doesn't really seems right.

Also, after trying to solve the problem myself, I found out that changing the movement type to levitation does force the unit to stay at the same height. However, I am not entirely satisfied with this solution since I am trying to make this spell easy to adapt to any unit, with thus possibly different height and it looks like you can only change the flying height of a unit whose movement type is flying, not levitation.


So if anyone can help me with this weird "drop" I'd be very thankful!
 
Level 3
Joined
Jan 2, 2015
Messages
15
Oh you're right, I hadn't thought about that, sorry!
Here's a link: LightOrbs.w3x
(it's on mediafire)

I tested with some other models (among which the night elf archer) and had the same problem. I can probably just set it to levitation but I'd like to know why it's happening nevertheless.
(My guess would be on the unit being moved "while" attacking it might cause an issue? No real idea though)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
The orbs are not falling...

They are rotating to face the target to attack. Since they are flying and you gave them a maximum allowed roll of 180 degrees their model does a massive roll during rotation, which results in the buggy height change. Flying units will roll when turning to give more realistic flying animations. This is because planes in real life roll a bit when turning. I am guessing floating units do not roll, hence why that appeared to fix it.

The fix is to set the Art - Maximum Roll Angle (degrees) of the dummy unit to 0. No more roll when turning means no more apparent height change.
and it looks like you can only change the flying height of a unit whose movement type is flying, not levitation.
You can change any unit's flying height irrespective of Movement - Type by using the "flying trick". This is basically instantly adding and then removing one of the crow forms (forget if it is Mediev or Durid of Talon). After doing this the unit's flying height can be set by triggers as if it were flying, even when it is not.

This trick is used by a lot of trigger enhanced abilities to perform dynamic flying effects on units. For example a HotS Garrosh style unit toss ability would use it.

There is a slight MUI bug with your ability. Casting again will create more orbs around the caster (starting where the first cast left off) and then extend the duration of all the orbs to the most recent cast.
 
Last edited:
Level 3
Joined
Jan 2, 2015
Messages
15
Oh right! Thank you, I didn't know about that setting in the object editor, that's good to know.

Thank you as well for reminding me of the flying trick, I didn't know it could be applied to levitating unit, and I didn't even think about using it. I'll try to keep it in mind in the future.

And I'll try to correct this MUI bug, thanks for pointing it out.
 
Status
Not open for further replies.
Top