function Trig_SetCamera_Func001A takes nothing returns nothing
if GetEnumUnit() == udg_ClickedUnit[GetPlayerId(GetOwningPlayer(GetEnumUnit()))+1] then
set udg_CamPoint = GetUnitLoc(GetEnumUnit())
set udg_CamHeight = GetLocationZ(udg_CamPoint)
call SetCameraFieldForPlayer( GetOwningPlayer(GetEnumUnit()), CAMERA_FIELD_ZOFFSET, udg_CamHeight, 0.10 )
call SetCameraFieldForPlayer( GetOwningPlayer(GetEnumUnit()), CAMERA_FIELD_TARGET_DISTANCE, 800.00, 0.10 )
call SetCameraFieldForPlayer( GetOwningPlayer(GetEnumUnit()), CAMERA_FIELD_ANGLE_OF_ATTACK, 325.00, 0.10 )
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnumUnit()), udg_CamPoint, 0.10 )
call SetCameraFieldForPlayer( GetOwningPlayer(GetEnumUnit()), CAMERA_FIELD_ROTATION, GetUnitFacing(GetEnumUnit()), 0.25 )
call SetCameraFieldForPlayer(GetOwningPlayer(GetEnumUnit()),CAMERA_FIELD_ZOFFSET, GetCameraField(CAMERA_FIELD_ZOFFSET) + udg_CamHeight - GetCameraTargetPositionZ() + 75, 0.10)
call RemoveLocation(udg_CamPoint)
endif
endfunction
function Trig_SetCamera_Actions takes nothing returns nothing
call ForGroup( udg_CameraGroup, function Trig_SetCamera_Func001A )
endfunction
//===========================================================================
function InitTrig_SetCamera takes nothing returns nothing
set gg_trg_SetCamera = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_SetCamera, 0.02 )
call TriggerAddAction( gg_trg_SetCamera, function Trig_SetCamera_Actions )
endfunction