Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
CharacterCameraHandlerComponent.c File Reference

Go to the source code of this file.

Data Structures

class  SCR_CharacterCameraHandlerComponentClass
 

Functions

SCR_CharacterCameraHandlerComponentClass CameraHandlerComponentClass Attribute (category:"Camera Shake")
 
override void Init ()
 initialization More...
 
override void OnCameraActivate ()
 activation More...
 
void OnAlphatestChange (int a)
 
override void OnCameraDeactivate ()
 deactivation More...
 
bool IsDebugView ()
 
bool CheckVehicleADS ()
 
bool CheckIsInTurret (out bool isInAds)
 
override int CameraSelector ()
 selects next camera More...
 
protected bool ShouldForceFirstPersonInThirdPerson (CharacterControllerComponent controller)
 
override float GetCameraTransitionTime (int pFrom, int pTo)
 get how long should transition between given cameras be More...
 
override void OnThirdPersonSwitch (bool isInThirdPerson)
 when we switch between FPP and TPP More...
 
ScriptInvoker GetThirdPersonSwitchInvoker ()
 
override void OnBeforeCameraUpdate (float pDt, bool pIsKeyframe)
 before camera update More...
 
override void OnAfterCameraUpdate (float pDt, bool pIsKeyframe, inout vector transformMS[4], inout vector transformWS[4])
 after camera update More...
 
void UpdateHeadVisibility (vector cameraPositionWS)
 
protected void UpdateShake (float pDt)
 
void AddShakeToToTransform (inout vector transform[4], inout float fieldOfView)
 
void OnCameraSwitchPressed ()
 
override void CollisionSolver (float pDt, inout ScriptedCameraItemResult pOutResult, inout vector resCamTM[4], bool isKeyframe)
 collision solver More...
 
private void UpdateViewBob (float pDt)
 
float AddViewBobToTransform (inout vector pOutTransform[4], float pBobScale, bool pAllowTranslation)
 
private void UpdateAiming (vector transformMS[4])
 
bool Is3rdPersonView ()
 
private void ResetSlide ()
 
private bool ApplySmoothedSlide (float pDt, float slide, vector sideTraceStart, vector sideTraceDiff, float sideTraceMarginMultiplier, float shoulderDist, inout vector inoutMat[4])
 
protected bool CanUseOverlayCameraFOV ()
 
override float GetOverlayCameraFOVScalarWeight ()
 
SCR_RecoilCameraShakeParams GetRecoilShakeParams ()
 
protected override event float CalculateFovScalar (notnull CameraBase mainCamera, CameraBase overlayCamera)
 
bool IsCameraActive ()
 

Variables

private bool m_bWasVehicleADS
 
protected float m_fADSProgress
 
protected float m_fADSTime
 
const protected float FOCUS_DECELERATION_RATIO = 4.5
 
const protected float FOCUS_DEFAULT_ADS_TIME = 0.35
 
const protected float FOCUS_ADS_TIME_RATIO = 0.75
 
protected float m_fFocusTime
 
protected float m_fFocusDeceleration
 
protected bool m_bDoInterpolateFocus
 
protected float m_fFocusTargetValue
 
protected float m_fFocusValue
 
protected float m_fAutoFocusProgress
 
private SCR_ChimeraCharacter m_OwnerCharacter
 
private SCR_CharacterControllerComponent m_ControllerComponent
 
private CharacterAnimationComponent m_AnimationComponent
 
private InputManager m_InputManager
 
private EquipedLoadoutStorageComponent m_LoadoutStorage
 
private CharacterIdentityComponent m_IdentityComponent
 
private CharacterCommandHandlerComponent m_CmdHandler
 
private bool m_bApplySmoothedSlideThisFrame = true
 
private float m_fTargetSlide = 1
 
private float m_fSlideTime = 0.4
 
private float m_fCameraSlideFilter = 0
 
private float m_fCameraSlideFilterVelocity = 0
 
private float m_fChangedTimer = 0
 
private float m_fSlideTimeout = 0.4
 
private float m_fBob_Up = 0
 
private float m_fBob_Right = 0
 
private float m_fBob_ScaleSlow = 0
 
private float m_fBob_ScaleFast = 0
 
private int m_iHeadBoneIndex = -1
 
private float m_fTargetDistance = 0.0
 
private float m_fCameraDistanceFilter
 
private float m_fCameraDistanceFilterVel
 
private float m_fBobFreelokFilter
 
private float m_fBobFreelokFilterVel
 
private bool m_bPrevSlideDirectionInside = false
 
private bool m_b3rdCollision_UseLeftShoulder = false
 
private ref CharacterMovementState m_CharMovementState = new CharacterMovementState()
 

Function Documentation

◆ AddShakeToToTransform()

void AddShakeToToTransform ( inout vector  transform[4],
inout float  fieldOfView 
)
Parameters
[in,out]transform
[in,out]fieldOfView

Definition at line 578 of file CharacterCameraHandlerComponent.c.

◆ AddViewBobToTransform()

float AddViewBobToTransform ( inout vector  pOutTransform[4],
float  pBobScale,
bool  pAllowTranslation 
)
Parameters
[in,out]pOutTransform
[in]pBobScale
[in]pAllowTranslation
Returns

Definition at line 906 of file CharacterCameraHandlerComponent.c.

◆ ApplySmoothedSlide()

private bool ApplySmoothedSlide ( float  pDt,
float  slide,
vector  sideTraceStart,
vector  sideTraceDiff,
float  sideTraceMarginMultiplier,
float  shoulderDist,
inout vector  inoutMat[4] 
)

Definition at line 1026 of file CharacterCameraHandlerComponent.c.

◆ Attribute()

Definition at line 8 of file CharacterCameraHandlerComponent.c.

◆ CalculateFovScalar()

protected override event float CalculateFovScalar ( notnull CameraBase  mainCamera,
CameraBase  overlayCamera 
)

Definition at line 1129 of file CharacterCameraHandlerComponent.c.

◆ CanUseOverlayCameraFOV()

protected bool CanUseOverlayCameraFOV ( )

Definition at line 1087 of file CharacterCameraHandlerComponent.c.

◆ CheckIsInTurret()

bool CheckIsInTurret ( out bool  isInAds)
Parameters
[out]isInAds
Returns

Definition at line 134 of file CharacterCameraHandlerComponent.c.

◆ CheckVehicleADS()

bool CheckVehicleADS ( )
Returns

Definition at line 124 of file CharacterCameraHandlerComponent.c.

◆ GetRecoilShakeParams()

SCR_RecoilCameraShakeParams GetRecoilShakeParams ( )
Returns

Definition at line 1116 of file CharacterCameraHandlerComponent.c.

◆ GetThirdPersonSwitchInvoker()

ScriptInvoker GetThirdPersonSwitchInvoker ( )
Returns

Definition at line 414 of file CharacterCameraHandlerComponent.c.

◆ Is3rdPersonView()

bool Is3rdPersonView ( )
Returns

Definition at line 979 of file CharacterCameraHandlerComponent.c.

◆ IsCameraActive()

bool IsCameraActive ( )
Returns

Definition at line 1140 of file CharacterCameraHandlerComponent.c.

◆ IsDebugView()

bool IsDebugView ( )
Returns

Definition at line 110 of file CharacterCameraHandlerComponent.c.

◆ OnAlphatestChange()

void OnAlphatestChange ( int  a)
Parameters
[in]a

Definition at line 76 of file CharacterCameraHandlerComponent.c.

◆ OnCameraSwitchPressed()

void OnCameraSwitchPressed ( )

Definition at line 594 of file CharacterCameraHandlerComponent.c.

◆ ResetSlide()

private void ResetSlide ( )

Definition at line 1017 of file CharacterCameraHandlerComponent.c.

◆ ShouldForceFirstPersonInThirdPerson()

protected bool ShouldForceFirstPersonInThirdPerson ( CharacterControllerComponent  controller)

Definition at line 310 of file CharacterCameraHandlerComponent.c.

◆ UpdateAiming()

private void UpdateAiming ( vector  transformMS[4])

Definition at line 937 of file CharacterCameraHandlerComponent.c.

◆ UpdateHeadVisibility()

void UpdateHeadVisibility ( vector  cameraPositionWS)

Definition at line 554 of file CharacterCameraHandlerComponent.c.

◆ UpdateShake()

protected void UpdateShake ( float  pDt)

Definition at line 567 of file CharacterCameraHandlerComponent.c.

◆ UpdateViewBob()

private void UpdateViewBob ( float  pDt)

Definition at line 859 of file CharacterCameraHandlerComponent.c.

Variable Documentation

◆ FOCUS_ADS_TIME_RATIO

const protected float FOCUS_ADS_TIME_RATIO = 0.75

Definition at line 422 of file CharacterCameraHandlerComponent.c.

◆ FOCUS_DECELERATION_RATIO

const protected float FOCUS_DECELERATION_RATIO = 4.5

Definition at line 420 of file CharacterCameraHandlerComponent.c.

◆ FOCUS_DEFAULT_ADS_TIME

const protected float FOCUS_DEFAULT_ADS_TIME = 0.35

Definition at line 421 of file CharacterCameraHandlerComponent.c.

◆ m_AnimationComponent

private CharacterAnimationComponent m_AnimationComponent

Definition at line 986 of file CharacterCameraHandlerComponent.c.

◆ m_b3rdCollision_UseLeftShoulder

private bool m_b3rdCollision_UseLeftShoulder = false

Definition at line 1012 of file CharacterCameraHandlerComponent.c.

◆ m_bApplySmoothedSlideThisFrame

private bool m_bApplySmoothedSlideThisFrame = true

Definition at line 994 of file CharacterCameraHandlerComponent.c.

◆ m_bDoInterpolateFocus

protected bool m_bDoInterpolateFocus

Definition at line 430 of file CharacterCameraHandlerComponent.c.

◆ m_bPrevSlideDirectionInside

private bool m_bPrevSlideDirectionInside = false

Definition at line 1011 of file CharacterCameraHandlerComponent.c.

◆ m_bWasVehicleADS

private bool m_bWasVehicleADS

Definition at line 119 of file CharacterCameraHandlerComponent.c.

◆ m_CharMovementState

private ref CharacterMovementState m_CharMovementState = new CharacterMovementState()

Definition at line 1014 of file CharacterCameraHandlerComponent.c.

◆ m_CmdHandler

private CharacterCommandHandlerComponent m_CmdHandler

Definition at line 990 of file CharacterCameraHandlerComponent.c.

◆ m_ControllerComponent

private SCR_CharacterControllerComponent m_ControllerComponent

Definition at line 985 of file CharacterCameraHandlerComponent.c.

◆ m_fADSProgress

protected float m_fADSProgress

Definition at line 321 of file CharacterCameraHandlerComponent.c.

◆ m_fADSTime

protected float m_fADSTime

Definition at line 322 of file CharacterCameraHandlerComponent.c.

◆ m_fAutoFocusProgress

protected float m_fAutoFocusProgress

Definition at line 433 of file CharacterCameraHandlerComponent.c.

◆ m_fBob_Right

private float m_fBob_Right = 0

Definition at line 1002 of file CharacterCameraHandlerComponent.c.

◆ m_fBob_ScaleFast

private float m_fBob_ScaleFast = 0

Definition at line 1004 of file CharacterCameraHandlerComponent.c.

◆ m_fBob_ScaleSlow

private float m_fBob_ScaleSlow = 0

Definition at line 1003 of file CharacterCameraHandlerComponent.c.

◆ m_fBob_Up

private float m_fBob_Up = 0

Definition at line 1001 of file CharacterCameraHandlerComponent.c.

◆ m_fBobFreelokFilter

private float m_fBobFreelokFilter

Definition at line 1009 of file CharacterCameraHandlerComponent.c.

◆ m_fBobFreelokFilterVel

private float m_fBobFreelokFilterVel

Definition at line 1010 of file CharacterCameraHandlerComponent.c.

◆ m_fCameraDistanceFilter

private float m_fCameraDistanceFilter

Definition at line 1007 of file CharacterCameraHandlerComponent.c.

◆ m_fCameraDistanceFilterVel

private float m_fCameraDistanceFilterVel

Definition at line 1008 of file CharacterCameraHandlerComponent.c.

◆ m_fCameraSlideFilter

private float m_fCameraSlideFilter = 0

Definition at line 997 of file CharacterCameraHandlerComponent.c.

◆ m_fCameraSlideFilterVelocity

private float m_fCameraSlideFilterVelocity = 0

Definition at line 998 of file CharacterCameraHandlerComponent.c.

◆ m_fChangedTimer

private float m_fChangedTimer = 0

Definition at line 999 of file CharacterCameraHandlerComponent.c.

◆ m_fFocusDeceleration

protected float m_fFocusDeceleration

Definition at line 428 of file CharacterCameraHandlerComponent.c.

◆ m_fFocusTargetValue

protected float m_fFocusTargetValue

Definition at line 431 of file CharacterCameraHandlerComponent.c.

◆ m_fFocusTime

protected float m_fFocusTime

Definition at line 425 of file CharacterCameraHandlerComponent.c.

◆ m_fFocusValue

protected float m_fFocusValue

Definition at line 432 of file CharacterCameraHandlerComponent.c.

◆ m_fSlideTime

private float m_fSlideTime = 0.4

Definition at line 996 of file CharacterCameraHandlerComponent.c.

◆ m_fSlideTimeout

private float m_fSlideTimeout = 0.4

Definition at line 1000 of file CharacterCameraHandlerComponent.c.

◆ m_fTargetDistance

private float m_fTargetDistance = 0.0

Definition at line 1006 of file CharacterCameraHandlerComponent.c.

◆ m_fTargetSlide

private float m_fTargetSlide = 1

Definition at line 995 of file CharacterCameraHandlerComponent.c.

◆ m_IdentityComponent

private CharacterIdentityComponent m_IdentityComponent

Definition at line 989 of file CharacterCameraHandlerComponent.c.

◆ m_iHeadBoneIndex

private int m_iHeadBoneIndex = -1

Definition at line 1005 of file CharacterCameraHandlerComponent.c.

◆ m_InputManager

private InputManager m_InputManager

Definition at line 987 of file CharacterCameraHandlerComponent.c.

◆ m_LoadoutStorage

private EquipedLoadoutStorageComponent m_LoadoutStorage

Definition at line 988 of file CharacterCameraHandlerComponent.c.

◆ m_OwnerCharacter

private SCR_ChimeraCharacter m_OwnerCharacter

Definition at line 984 of file CharacterCameraHandlerComponent.c.