Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_CharacterCameraHandlerComponent Interface Reference
Inheritance diagram for SCR_CharacterCameraHandlerComponent:
CameraHandlerComponent

Public Member Functions

void SCR_CharacterCameraHandlerComponent (IEntityComponentSource src, IEntity ent, IEntity parent)
 
override void Init ()
 initialization
 
override void OnCameraActivate ()
 activation
 
void OnAlphatestChange (int a)
 
override void OnCameraDeactivate ()
 deactivation
 
bool IsDebugView ()
 
bool CheckVehicleADS ()
 
bool CheckIsInTurret (out bool isInAds)
 
override int CameraSelector ()
 selects next camera
 
override float GetCameraTransitionTime (int pFrom, int pTo)
 get how long should transition between given cameras be
 
override void OnThirdPersonSwitch (bool isInThirdPerson)
 when we switch between FPP and TPP
 
ScriptInvokerVoid GetThirdPersonSwitchInvoker ()
 
override void OnBeforeCameraUpdate (float pDt, bool pIsKeyframe)
 before camera update
 
override void OnAfterCameraUpdate (float pDt, bool pIsKeyframe, inout vector transformMS[4], inout vector transformWS[4])
 after camera update
 
void UpdateHeadVisibility (vector cameraPositionWS)
 
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
 
float AddViewBobToTransform (inout vector pOutTransform[4], float pBobScale, bool pAllowTranslation)
 
bool Is3rdPersonView ()
 
override float GetOverlayCameraFOVScalarWeight ()
 Weight in the <0, 1> range of how much input sensitivity should be modulated if an overlay camera is active.
 
SCR_RecoilCameraShakeParams GetRecoilShakeParams ()
 
bool IsCameraActive ()
 
- Public Member Functions inherited from CameraHandlerComponent
proto external ScriptedCameraSet GetCameraSet ()
 
proto external bool IsInThirdPerson ()
 Returns true if the camera is in third person mode.
 
proto external void SetThirdPerson (bool val)
 Set the current third person camera state.
 
proto external float GetFocusMode ()
 Returns the current value of the focus mode.
 
proto external void SetFocusMode (float focusMode)
 Set the current value of the focus mode.
 
proto external float GetBlendAlpha (ScriptedCameraItem forCameraItem)
 
proto external ScriptedCameraItem GetCurrentCamera ()
 returns current active camera
 
proto external bool IsCameraBlending ()
 returns true if there's more than one processing camera
 
proto external void SetLensFlareSet (CameraLensFlareSetType type, string lensFlareSetUserName)
 Sets camera lens flare set.
 

Static Public Member Functions

static void SetOverlayCameraFOV (float fov)
 
static void SetADSSensitivity (float sensitivity)
 

Protected Member Functions

bool ShouldForceFirstPersonInThirdPerson (CharacterControllerComponent controller)
 
void UpdateShake (float pDt)
 
bool CanUseOverlayCameraFOV ()
 
override float CalculateFovScalar (notnull CameraBase mainCamera, CameraBase overlayCamera)
 Calculate and return desired fov scalar.
 

Protected Attributes

ref SCR_RecoilCameraShakeParams m_pRecoilShakeParams
 
ref SCR_RecoilCameraShakeProgress m_pRecoilShake = new SCR_RecoilCameraShakeProgress()
 Progress of recoil based camera shake.
 
ref ScriptInvokerVoid m_OnThirdPersonSwitch = new ScriptInvokerVoid()
 
int m_iHipsBoneIndex = 0
 
bool m_bCameraActive
 
float m_fADSProgress
 
float m_fADSTime
 
float m_fFocusTime
 
float m_fFocusDeceleration
 
bool m_bDoInterpolateFocus
 
float m_fFocusTargetValue
 
float m_fFocusValue
 
float m_fAutoFocusProgress
 

Static Protected Attributes

static float s_fOverlayCameraFOV
 
static float s_fADSSensitivity = 1.0
 
const float FOCUS_DECELERATION_RATIO = 4.5
 
const float FOCUS_DEFAULT_ADS_TIME = 0.35
 
const float FOCUS_ADS_TIME_RATIO = 0.75
 

Constructor & Destructor Documentation

◆ SCR_CharacterCameraHandlerComponent()

void SCR_CharacterCameraHandlerComponent.SCR_CharacterCameraHandlerComponent ( IEntityComponentSource src,
IEntity ent,
IEntity parent )
Parameters
[in]src
[in]ent
[in]parent

Member Function Documentation

◆ AddShakeToToTransform()

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

◆ AddViewBobToTransform()

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

◆ CalculateFovScalar()

override float SCR_CharacterCameraHandlerComponent.CalculateFovScalar ( notnull CameraBase mainCamera,
CameraBase overlayCamera )
protected

Calculate and return desired fov scalar.

1.0 = normal

Parameters
mainCameraMain camera used, usually player camera
overlayCameraOverlay camera, usually PiP camera or null

Implements CameraHandlerComponent.

◆ CameraSelector()

override int SCR_CharacterCameraHandlerComponent.CameraSelector ( )

selects next camera

game camera selection

we need to stabilize camera before roll action is complete, so by that time player is ready to aim at target

Setup here all conditions where we want to use camera transformation from bone directly Roll case

Implements CameraHandlerComponent.

◆ CanUseOverlayCameraFOV()

bool SCR_CharacterCameraHandlerComponent.CanUseOverlayCameraFOV ( )
protected

◆ CheckIsInTurret()

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

◆ CheckVehicleADS()

bool SCR_CharacterCameraHandlerComponent.CheckVehicleADS ( )
Returns

◆ CollisionSolver()

override void SCR_CharacterCameraHandlerComponent.CollisionSolver ( float pDt,
inout ScriptedCameraItemResult pOutResult,
inout vector resCamTM[4],
bool isKeyframe )

collision solver

Implements CameraHandlerComponent.

◆ GetCameraTransitionTime()

override float SCR_CharacterCameraHandlerComponent.GetCameraTransitionTime ( int pFrom,
int pTo )

get how long should transition between given cameras be

Implements CameraHandlerComponent.

◆ GetOverlayCameraFOVScalarWeight()

override float SCR_CharacterCameraHandlerComponent.GetOverlayCameraFOVScalarWeight ( )

Weight in the <0, 1> range of how much input sensitivity should be modulated if an overlay camera is active.

(0 = main camera, 1 = overlay camera).

Implements CameraHandlerComponent.

◆ GetRecoilShakeParams()

SCR_RecoilCameraShakeParams SCR_CharacterCameraHandlerComponent.GetRecoilShakeParams ( )
Returns

◆ GetThirdPersonSwitchInvoker()

ScriptInvokerVoid SCR_CharacterCameraHandlerComponent.GetThirdPersonSwitchInvoker ( )
Returns

◆ Init()

override void SCR_CharacterCameraHandlerComponent.Init ( )

initialization

Implements CameraHandlerComponent.

◆ Is3rdPersonView()

bool SCR_CharacterCameraHandlerComponent.Is3rdPersonView ( )
Returns

◆ IsCameraActive()

bool SCR_CharacterCameraHandlerComponent.IsCameraActive ( )
Returns

◆ IsDebugView()

bool SCR_CharacterCameraHandlerComponent.IsDebugView ( )
Returns

◆ OnAfterCameraUpdate()

override void SCR_CharacterCameraHandlerComponent.OnAfterCameraUpdate ( float pDt,
bool pIsKeyframe,
inout vector transformMS[4],
inout vector transformWS[4] )

after camera update

aiming update

update recoil and generic camera shake

Implements CameraHandlerComponent.

◆ OnAlphatestChange()

void SCR_CharacterCameraHandlerComponent.OnAlphatestChange ( int a)
Parameters
[in]a

◆ OnBeforeCameraUpdate()

override void SCR_CharacterCameraHandlerComponent.OnBeforeCameraUpdate ( float pDt,
bool pIsKeyframe )

before camera update

Implements CameraHandlerComponent.

◆ OnCameraActivate()

override void SCR_CharacterCameraHandlerComponent.OnCameraActivate ( )

activation

Implements CameraHandlerComponent.

◆ OnCameraDeactivate()

override void SCR_CharacterCameraHandlerComponent.OnCameraDeactivate ( )

deactivation

Implements CameraHandlerComponent.

◆ OnCameraSwitchPressed()

void SCR_CharacterCameraHandlerComponent.OnCameraSwitchPressed ( )

◆ OnThirdPersonSwitch()

override void SCR_CharacterCameraHandlerComponent.OnThirdPersonSwitch ( bool isInThirdPerson)

when we switch between FPP and TPP

Implements CameraHandlerComponent.

◆ SetADSSensitivity()

static void SCR_CharacterCameraHandlerComponent.SetADSSensitivity ( float sensitivity)
static
Parameters
[in]sensitivity

◆ SetOverlayCameraFOV()

static void SCR_CharacterCameraHandlerComponent.SetOverlayCameraFOV ( float fov)
static
Parameters
[in]fov

◆ ShouldForceFirstPersonInThirdPerson()

bool SCR_CharacterCameraHandlerComponent.ShouldForceFirstPersonInThirdPerson ( CharacterControllerComponent controller)
protected

◆ UpdateHeadVisibility()

void SCR_CharacterCameraHandlerComponent.UpdateHeadVisibility ( vector cameraPositionWS)

◆ UpdateShake()

void SCR_CharacterCameraHandlerComponent.UpdateShake ( float pDt)
protected

Member Data Documentation

◆ FOCUS_ADS_TIME_RATIO

const float SCR_CharacterCameraHandlerComponent.FOCUS_ADS_TIME_RATIO = 0.75
staticprotected

◆ FOCUS_DECELERATION_RATIO

const float SCR_CharacterCameraHandlerComponent.FOCUS_DECELERATION_RATIO = 4.5
staticprotected

◆ FOCUS_DEFAULT_ADS_TIME

const float SCR_CharacterCameraHandlerComponent.FOCUS_DEFAULT_ADS_TIME = 0.35
staticprotected

◆ m_bCameraActive

bool SCR_CharacterCameraHandlerComponent.m_bCameraActive
protected

◆ m_bDoInterpolateFocus

bool SCR_CharacterCameraHandlerComponent.m_bDoInterpolateFocus
protected

◆ m_fADSProgress

float SCR_CharacterCameraHandlerComponent.m_fADSProgress
protected

◆ m_fADSTime

float SCR_CharacterCameraHandlerComponent.m_fADSTime
protected

◆ m_fAutoFocusProgress

float SCR_CharacterCameraHandlerComponent.m_fAutoFocusProgress
protected

◆ m_fFocusDeceleration

float SCR_CharacterCameraHandlerComponent.m_fFocusDeceleration
protected

◆ m_fFocusTargetValue

float SCR_CharacterCameraHandlerComponent.m_fFocusTargetValue
protected

◆ m_fFocusTime

float SCR_CharacterCameraHandlerComponent.m_fFocusTime
protected

◆ m_fFocusValue

float SCR_CharacterCameraHandlerComponent.m_fFocusValue
protected

◆ m_iHipsBoneIndex

int SCR_CharacterCameraHandlerComponent.m_iHipsBoneIndex = 0
protected

◆ m_OnThirdPersonSwitch

ref ScriptInvokerVoid SCR_CharacterCameraHandlerComponent.m_OnThirdPersonSwitch = new ScriptInvokerVoid()
protected

◆ m_pRecoilShake

ref SCR_RecoilCameraShakeProgress SCR_CharacterCameraHandlerComponent.m_pRecoilShake = new SCR_RecoilCameraShakeProgress()
protected

Progress of recoil based camera shake.

◆ m_pRecoilShakeParams

ref SCR_RecoilCameraShakeParams SCR_CharacterCameraHandlerComponent.m_pRecoilShakeParams
protected

◆ s_fADSSensitivity

float SCR_CharacterCameraHandlerComponent.s_fADSSensitivity = 1.0
staticprotected

◆ s_fOverlayCameraFOV

float SCR_CharacterCameraHandlerComponent.s_fOverlayCameraFOV
staticprotected

The documentation for this interface was generated from the following file: