| 05-05-2007, 04:51 PM | #1 |
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 |
24 hours and no replies? =( |
| 05-06-2007, 02:05 PM | #3 |
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 |
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. |
| 05-07-2007, 03:21 AM | #5 | |
Quote:
Ooh, that's useful. What attachment points does it have? |
| 05-07-2007, 11:15 AM | #6 |
Attachment point is "chest". And I'm nearly 100% sure it was Infrane. |
| 05-07-2007, 11:24 AM | #7 |
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 |
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 | |
Why not just add 180 to the facing angle instead? Quote:
That's the one I use. |
| 05-08-2007, 01:22 PM | #10 |
Exilus, please read the forum rules and stop double posting. |
