- Joined
- Mar 29, 2012
- Messages
- 542
I would like to use special effect as my projectile missile rather than dummy unit. The problem here is about the orientation.
I used this to change the dummy unit orientation:
But I would prefer to use the new function:
I don't find function to change the facing angle so I assumed that roll is equal to unit facing angle.
I tried testing this function on a single special effect, but I got a problem.
If I set pitch to 90 (with roll = 0), it works.
If I set pitch to 90 (with roll = 90), pitch won't change.
I can only change pitch to anything I want if roll is 0.
Download the test map below to try and see the experiment.
I used this to change the dummy unit orientation:
JASS:
function SetUnitPitch takes unit targetUnit, real pitch returns nothing
local integer i = R2I(pitch * bj_RADTODEG + 90.5)
if (179 < i) then
set i = 179
elseif (0 > i) then
set i = 0
endif
call SetUnitAnimationByIndex(targetUnit, i)
endfunction
But I would prefer to use the new function:
call BlzSetSpecialEffectOrientation(fx, 0, pitch, roll)
I don't find function to change the facing angle so I assumed that roll is equal to unit facing angle.
I tried testing this function on a single special effect, but I got a problem.
If I set pitch to 90 (with roll = 0), it works.
If I set pitch to 90 (with roll = 90), pitch won't change.
I can only change pitch to anything I want if roll is 0.
Download the test map below to try and see the experiment.
Attachments
Last edited: