HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How to change and block unit Roll angle?

05-05-2007, 04:51 PM#1
Exilus
i want to know how i can block the unit roll angle. i have seen it done in Elimination, where the projectiles models could face a Z offset.. (a projectile angle "___" could be " \ "). i am actually making a map where you control a helicopter in 3D space , you can make loopings and all, but i would like the helicopter to have the same model Z inclinaison as my Helicopter_Inclinaison varriable, wich calculate the trajectory on a Z offset..
i am almost 100 % sure it doesnt exist in gui, so if anyone could give me the Jass function to change a unit inclinaison, i would be grateful.
05-06-2007, 01:22 PM#2
Exilus
24 hours and no replies? =(
05-06-2007, 02:05 PM#3
Ammorth
I believe you can't do that, but you have to make the model have many different animations for each angle wanted.

I think elimination uses a dummy unit to do just that, and then attach the effect to the unit, but I could be wrong.
05-06-2007, 02:14 PM#4
Rising_Dusk
Yes, all maps with this use an imported dummy.
I've taken the liberty to attach it to this post for you.
Credits to Anitarf/Infrane.
(I forget which made it. >_>)

Use SetUnitAnimationByIndex(MyUnit, MyIndex) to set the pitch.
180 for the index is directly up, 0 is directly down.
Allows for full rotation.
Have fun.
Attached Files
File type: mdxPitchDummy.MDX (33.3 KB)
05-07-2007, 03:21 AM#5
Tossrock
Quote:
Originally Posted by Rising_Dusk
Yes, all maps with this use an imported dummy.
I've taken the liberty to attach it to this post for you.
Credits to Anitarf/Infrane.
(I forget which made it. >_>)

Use SetUnitAnimationByIndex(MyUnit, MyIndex) to set the pitch.
180 for the index is directly up, 0 is directly down.
Allows for full rotation.
Have fun.

Ooh, that's useful. What attachment points does it have?
05-07-2007, 11:15 AM#6
blu_da_noob
Attachment point is "chest". And I'm nearly 100% sure it was Infrane.
05-07-2007, 11:24 AM#7
Anitarf
The only problem with such a dummy model is that the actual model for the projectile/unit needs to be attached as a special effect, so it will only play it's stand animation (and birth/death when created/destroyed). Might be enough for a helicopter.
05-07-2007, 11:31 AM#8
Exilus
Thanks guys. it was exactly what i needed.

im actually editing the model to allow it to do a 360 degree turn.
05-08-2007, 02:49 AM#9
Rising_Dusk
Why not just add 180 to the facing angle instead?

Quote:
Attachment point is "chest".
Origin works too.
That's the one I use.
05-08-2007, 01:22 PM#10
blu_da_noob
Exilus, please read the forum rules and stop double posting.