rover2341
Is riding a roller coaster...Wee!
- Reaction score
- 113
About
I am trying to figure out how to use SetUnitLookAt to set my Yaw and pitch.
I changed my model like the quote said, and I can make my model angle at another unit. But I cant figure out how to set the Yaw and Pitch to what i want, with only 1 unit.
What I Did
I changed the name of bone_head and it worked.
What Works
Now With 2 units I can have one look at the other at the with yaw and pitch.
What I still Need
I want 1 Unit to be set at yaw and pitch. (x = pitch) (y = yaw)
I understand how to work with "SetUnitLookAt"
Code
Code is done in vJass.
I am trying to figure out how to use SetUnitLookAt to set my Yaw and pitch.
I changed my model like the quote said, and I can make my model angle at another unit. But I cant figure out how to set the Yaw and Pitch to what i want, with only 1 unit.
You use dummy which has its main bone named "head" and then rotate it with SetUnitLookAt
What I Did
I changed the name of bone_head and it worked.
What Works
Now With 2 units I can have one look at the other at the with yaw and pitch.
What I still Need
I want 1 Unit to be set at yaw and pitch. (x = pitch) (y = yaw)
I understand how to work with "SetUnitLookAt"
Code
Code is done in vJass.
JASS:
library SetupGame initializer InitA
function environment takes nothing returns nothing
call SetSkyModel( "Environment\\Sky\\LordaeronSummerSky\\LordaeronSummerSky.mdl" )
call FogEnableOff( )
call FogMaskEnableOff( )
call UseTimeOfDayBJ( false )
call SetTimeOfDay( 12 )
endfunction
function createUnitWithYawAndPitch takes nothing returns nothing
local integer myUnitType = 039;Trac039;
local unit myUnit
local unit myUnit2
set myUnit = CreateUnit(Player(0),myUnitType,200,200,90)
set myUnit2 = CreateUnit(Player(0),myUnitType,0,0,90)
call SetUnitFlyHeight(myUnit,400,0)
call SetUnitLookAt(myUnit,"head", myUnit2, 0,0,0)
endfunction
//===========================================================================
function InitA takes nothing returns nothing
call createUnitWithYawAndPitch()
call environment()
endfunction
endlibrary