SFX Pitch

Level 18
Joined
Mar 21, 2011
Messages
1,622
Hello,
short and hopefully simple question.
What is the best formula to get a working radiant for the SFX pitch? Whenever i try to rotate an object, it starts flickering, so it probably requres something like PI/2 in its formula?
I am trying for literal hours now but obviously i am too retarded.
Best solution for me would be a degree input (0 - 360), and the correct radiant outcome for the pitch.
thanks in andvance
 
JASS:
scope s initializer OnInit

   globals
      real angle = 0.
      effect sfx = null
   endglobals

   function OnPeriodic takes nothing returns nothing
      set angle = angle + 0.5
      call BlzSetSpecialEffectPitch(sfx, DegToRad(angle))
   endfunction

   private function OnInit takes nothing returns nothing
      set sfx = AddSpecialEffect("SomeEffect", 0., 0.)
      call TimerStart(NewTimer(), true, 0.03125, OnPeriodic)
   endfunction

endscope

pretty much like this
 
Back
Top