- Joined
- Jul 26, 2008
- Messages
- 1,009
Hi, I have a camera system in place that basically functions off of hitting up/down and left/right for rotation with 90 degree rotations for left/right and a -900 (down) and 2000 (up) distance limit.
I want the camera to point more upwards for the angle, but am not sure how to adjust it to do that. Any help is appreciated. I believe this is the part relevant to that. I'm a bit of a noob with angles and cameras.
I want the camera to point more upwards for the angle, but am not sure how to adjust it to do that. Any help is appreciated. I believe this is the part relevant to that. I'm a bit of a noob with angles and cameras.
JASS:
function Trig_PlayerCam_Func002A takes nothing returns nothing
local integer id = GetPlayerId(GetEnumPlayer())+1
if udg_HERO_FloatCam[id] == false then
if udg_HERO_Ref2[id] != null then
if GetLocalPlayer() == GetEnumPlayer() then //DO NOT REFERENCE NON-GLOBALS IN A LOCAL, so NO GetHeroPlayer(id)
call PanCameraToTimed( GetUnitX(udg_HERO_Ref2[id]), GetUnitY(udg_HERO_Ref2[id]), 0.50 )
call SetCameraField( CAMERA_FIELD_TARGET_DISTANCE, 500.00 + Distance[id], 0.50 )
call SetCameraField( CAMERA_FIELD_ANGLE_OF_ATTACK, 320.00 + Angle[id], 0.50 )
call SetCameraField( CAMERA_FIELD_ROTATION, GetUnitFacing(udg_HERO_Ref2[id]) + Rotation[id], 0.50 )
call SetCameraField( CAMERA_FIELD_ZOFFSET, 200.00, 0.50 )
endif
endif
endif
endfunction
Last edited: