• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

xefx Z-Angle Limitations

Status
Not open for further replies.
Level 5
Joined
Oct 24, 2007
Messages
90
Hello... I have a doubt with the xefx library... with its zangle option.

I was trying to completely turn around an effect: 180 degrees. When I set the zangle value in the xefx to bj_PI or -bj_PI, the effect is shown at bj_PI/2 or -bj_PI/2, respectively (at 90 degrees). It seems the limit for the zangle is between -90 and 90, because the effect is always shown either pointing left or pointing right, no matter the value I set to zangle (as long as it is less than -bj_PI/2 or greater than bj_PI/2). I would like to know why this happens, and if there is a way to flip over the effect like I want to and go over the 90 degree limit.

PS: Yes, I posted this at Vexorian's forum at WC3C, but I'm sick of WC3C... none of my posts are visible for some reason.
 
JASS:
       method operator zangle= takes real value returns nothing
        local integer i=R2I(value*bj_RADTODEG+90.5)
           set this.zang=value
           if(i>=180) then
               set i=179
           elseif(i<0) then
               set i=0
           endif
               
           call SetUnitAnimationByIndex(this.dummy, i  )
       endmethod
seems like there is a limit to the angle
never liked this kind of zangle setting anyway
imho SetUnitLookAt is better
 
Level 5
Joined
Oct 24, 2007
Messages
90
JASS:
       method operator zangle= takes real value returns nothing
        local integer i=R2I(value*bj_RADTODEG+90.5)
           set this.zang=value
           if(i>=180) then
               set i=179
           elseif(i<0) then
               set i=0
           endif
               
           call SetUnitAnimationByIndex(this.dummy, i  )
       endmethod
seems like there is a limit to the angle
never liked this kind of zangle setting anyway
imho SetUnitLookAt is better

SetUnitLookAt?

JASS:
native SetUnitLookAt takes unit whichUnit, string whichBone, unit lookAtTarget, real offsetX, real offsetY, real offsetZ returns nothing
How does that work? Does it have the same effect (turning the unit so it is upside-down)?

Also - For some reason, I can't set negative values to the field "Art - Maximum Pitch Angle" in the Object Editor. I did check the option to "Allow negative real values in the Object Editor". I use JNGP. Why might this be happening?

Thanks in advance :wink:
 
SetUnitLookAt?

JASS:
native SetUnitLookAt takes unit whichUnit, string whichBone, unit lookAtTarget, real offsetX, real offsetY, real offsetZ returns nothing
How does that work? Does it have the same effect (turning the unit so it is upside-down)?

Also - For some reason, I can't set negative values to the field "Art - Maximum Pitch Angle" in the Object Editor. I did check the option to "Allow negative real values in the Object Editor". I use JNGP. Why might this be happening?

Thanks in advance :wink:

for entering negative values try shiftclick or shift+enter

http://www.thehelper.net/forums/showthread.php/145620-H
ow-to-set-Yaw-and-Pitch-for-a-Unit
but you need a special dummy for it
(is a lot smaller in size and much more versatile)
made you one
has origin, head, chest attachment points and roots
 

Attachments

  • D4RKsZAngleDummy.mdx
    2.4 KB · Views: 77
Status
Not open for further replies.
Top