12 m_WeaponManager = BaseWeaponManagerComponent.Cast(
m_OwnerCharacter.FindComponent(BaseWeaponManagerComponent));
16 override void OnActivate (ScriptedCameraItem pPrevCamera, ScriptedCameraItemResult pPrevCameraResult)
18 super.OnActivate(pPrevCamera, pPrevCameraResult);
22 override void OnUpdate(
float pDt, out ScriptedCameraItemResult pOutResult)
24 pOutResult.m_bUpdateWhenBlendOut =
false;
25 pOutResult.m_bWSCameraSmoothing =
false;
28 int debugView = DiagMenu.GetValue(
SCR_DebugMenuID.DEBUGUI_CHARACTER_DEBUG_VIEW);
31 Math3D.MatrixIdentity4(pOutResult.m_CameraTM);
34 pOutResult.m_CameraTM[3] =
"0.0 0.03 -0.07";
35 pOutResult.m_CameraTM[3] = -vector.Forward * 0.6 + pOutResult.m_CameraTM[3];
37 pOutResult.m_iDirectBone = m_iHeadBoneIndex;
38 pOutResult.m_iDirectBoneMode = EDirectBoneMode.RelativeDirection;
39 pOutResult.m_fUseHeading = 0.0;
40 pOutResult.m_fFOV = 30;
42 super.OnUpdate(pDt, pOutResult);
51 m_WeaponManager.GetCurrentMuzzleTransform(baseMat);
56 Math3D.AnglesToMatrix(
"180 0 0", rotMat);
57 Math3D.MatrixMultiply3(baseMat, rotMat, pOutResult.m_CameraTM);
58 pOutResult.m_CameraTM[3] = baseMat[2] * 1.5 + baseMat[3];
60 Math3D.MatrixInvMultiply4(charMat, pOutResult.m_CameraTM, pOutResult.m_CameraTM);
62 pOutResult.m_fFOV = 40;
68 Math3D.AnglesToMatrix(
"90 0 0", pOutResult.m_CameraTM);
70 Math3D.AnglesToMatrix(
"-90 0 0", pOutResult.m_CameraTM);
72 Math3D.AnglesToMatrix(
"180 0 0", pOutResult.m_CameraTM);
74 Math3D.AnglesToMatrix(
"0 0 0", pOutResult.m_CameraTM);
76 Math3D.AnglesToMatrix(
"0 -90 0", pOutResult.m_CameraTM);
78 Math3D.AnglesToMatrix(
"0 90 0", pOutResult.m_CameraTM);
80 pOutResult.m_fUseHeading = 0.0;
81 pOutResult.m_CameraTM[3] = pOutResult.m_CameraTM[2] * -2.5 + vector.Up * 1;
82 pOutResult.m_fFOV = 50;
86 protected int m_iHeadBoneIndex;
87 protected BaseWeaponManagerComponent m_WeaponManager =
null;