10 m_CameraOffsetMS =
"0.0 0.7 0.0";
11 m_CameraOffsetLS =
"0.0 0.3 0.0";
12 m_fShoulderWidth = 0.4;
14 CharacterCommandHandlerComponent cmdHandler = CharacterCommandHandlerComponent.Cast(m_CharacterAnimationComponent.FindComponent(CharacterCommandHandlerComponent));
15 m_CommandMove = cmdHandler.GetCommandMove();
20 override void OnUpdate(
float pDt, out ScriptedCameraItemResult pOutResult)
24 movement = (Math.Clamp(movement, 1, 3) - 1.0) * 0.5;
25 movement *= CONST_CAMERAMOVEMENTHEIGH;
27 float stanceCameraHeight = 0.0;
29 m_fCameraHeight = Math.SmoothCD(m_fCameraHeight, Math.Max(movement, stanceCameraHeight), m_fCameraHeightVel, 0.2, 1000, pDt);
30 m_CameraOffsetMS[1] = 0.7 + m_fCameraHeight;
33 pOutResult.m_fFOV = m_fFOV;
37 pOutResult.m_fFOV = m_fFOV + 5 * m_fBobScale;
39 super.OnUpdate(pDt, pOutResult);
42 if (m_CharacterCameraHandler)
43 m_CharacterCameraHandler.AddShakeToToTransform(pOutResult.m_CameraTM, pOutResult.m_fFOV);
47 static const float CONST_CAMERAMOVEMENTHEIGH = 0.1;
48 static const float CONST_CAMERA_STANCE_ADJ_BY_MOVEMENT = 0.1;
52 protected float m_fCameraHeight, m_fCameraHeightVel;