Units Foot to Head angle

Choppa

www.warcraft-gamers.po.gs
Reaction score
59
I was wondering if there is any way to change a units angle from the ground to his head, like say a peasent stand like this...
Code:
 O>
-|-
 |
/ \
Is there anyway to get him like this...
Code:
^
O-|--<
So he's facing towards the sky...
 

waaaks!

Zinctified
Reaction score
255
i believe that only doodads has a pitch angle

but this function makes a unit change it's Z angle, that means, you can make the unit lie down
but i think this function is only for the caster system's caster
JASS:
function Caster_SetZAngle takes unit caster, real ang returns nothing
 local real a=(ModuloReal(GetUnitFacing(caster),360)*bj_DEGTORAD)
 local real x
    set ang=ModuloReal(ang,360)
    if ( ang == 90 ) then
        set ang = 89
    endif
    if ( ang == 270 ) then
        set ang = 271
    endif
    if (ang&gt;90) and (ang&lt;270) then
        set x=-1
    else
        set x=1
    endif
    set ang=ang*bj_DEGTORAD
    call SetUnitLookAt(caster,&quot;Bone_Chest&quot;,caster, 10000.0*Cos(a)*Cos(ang), 10000.0*Sin(a)*Cos(ang), x*(10000.0*Tan(ang)+90.0) )
endfunction
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top