HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Roll Angle

05-27-2006, 06:45 PM#1
James59281
Okay... Is there ANY way to change the roll or pitch angles of a unit through triggers.

I'm asking this because i'm trying to make a custom movement system for an air unit, and need to be able to pitch it up and down and roll it clockwise and anticlockwise to do that, otherwise it'll look stupid.

so is there any way at all to change the roll or pitch angles?
or am i doomed to failure?

Thanks in advance.
05-27-2006, 07:59 PM#2
shadow1500
You cant change them through triggers, but you can try changing the names of the root bone to head in the model, and then you'll be able to change roll/pitch with the "Animation - Set Unit Body Part Facing" (i think thats the name)
05-27-2006, 08:22 PM#3
iNfraNe
If you merely want to change the units pitch/roll and only (nothing else!) play its stand animations, you can apply it as a special effect to the origin of any dummy model.

I made this dummy model, which has 181 animations, 1 for each angle posible. You'll have to use SetUnitAnimationByIndex for this one, animation 91 = horizontal, 0 = -90degrees, 181 = 90degrees.

You can also use any other dummy model, but those require a lookat unit too.
Attached Files
File type: rarDummy.rar (4.3 KB)
05-27-2006, 10:13 PM#4
James59281
Quote:
Originally Posted by iNfraNe
If you merely want to change the units pitch/roll and only (nothing else!) play its stand animations, you can apply it as a special effect to the origin of any dummy model.

I made this dummy model, which has 181 animations, 1 for each angle posible. You'll have to use SetUnitAnimationByIndex for this one, animation 91 = horizontal, 0 = -90degrees, 181 = 90degrees.

You can also use any other dummy model, but those require a lookat unit too.

Well thanks for the dummy model, that sounds like a good way to do it.
I just attached my model (which is a custom model, not a wc3 standard one) as a special effect to the origin of my unit, with the unit having your preset dummy model.
Unfortunately, i now have another problem... the attached model of my air unit is jiggling up and down, not remaining stationary. Is this a problem with the model, or can i do something through triggers for it?
05-27-2006, 10:20 PM#5
iNfraNe
Like I said, u'll have to play its animations depending on the angle you're having.

lets say you have an angle going from -90 to 90 (standard angle of attack). Store that in a real variable and do this action:
Collapse JASS:
call SetUnitAnimationByIndex(udg_unitvariable, R2I(udg_angle+90))
which will make the unit play its correct animation making the special effect attached face a certain angle.
05-27-2006, 10:25 PM#6
James59281
Quote:
Originally Posted by iNfraNe
Like I said, u'll have to play its animations depending on the angle you're having.

lets say you have an angle going from -90 to 90 (standard angle of attack). Store that in a real variable and do this action:
Collapse JASS:
call SetUnitAnimationByIndex(udg_unitvariable, R2I(udg_angle+90))
which will make the unit play its correct animation making the special effect attached face a certain angle.

OH RIGHT!!! I GET IT NOW!!
Thanks a lot, that really helped!!

+ REP for you
09-19-2009, 07:37 AM#7
cleeezzz
sorry to revive this thread but what if i wanted to be able to roll on the units side too? this seems to only tilt the unit up and down
09-19-2009, 08:30 AM#8
Bobo_The_Kodo
Quote:
sorry to revive this thread but what if i wanted to be able to roll on the units side too? this seems to only tilt the unit up and down
You don't?