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

Go to the source code of this file.

Data Structures

class  SCR_CameraShakeManagerComponentClass
 

Functions

void DoAddCameraShake (float linearMagnitude=1.0, float angularMagnitude=1.0, float inTime=0.01, float sustainTime=0.1, float outTime=0.24)
 
void DoAddCameraShake (SCR_BaseCameraShakeProgress instance)
 
void DoApplyCameraShake (inout vector matrix[4], inout float fov)
 
void DoClearCameraShake ()
 Clears all existing camera shake progress(es). More...
 
override void OnPostInit (IEntity owner)
 Called on PostInit when all components are added. More...
 
override void EOnFrame (IEntity owner, float timeSlice)
 

Variables

SCR_CameraShakeManagerComponentClass m_mShakeMatrix [4]
 This manager allows adding camera shake that is updated automatically and can be applied to any transform via provided API. More...
 
protected float m_fFovScale
 
const int CAMERA_SHAKE_INSTANCES = 16
 Array of pre-cached generic shakes. More...
 
ref SCR_NoisyCameraShakeProgress m_aShakeInstances [CAMERA_SHAKE_INSTANCES]
 
ref array< ref SCR_BaseCameraShakeProgressm_aAdditionalInstances = {}
 Array of custom shakes. More...
 

Function Documentation

◆ DoAddCameraShake() [1/2]

void DoAddCameraShake ( float  linearMagnitude = 1.0,
float  angularMagnitude = 1.0,
float  inTime = 0.01,
float  sustainTime = 0.1,
float  outTime = 0.24 
)

Adds camera shake.

Parameters
[in]linearMagnitudeMagnitude of linear (positional change) shake
[in]angularMagnitudeMagnitude of angular (rotational change) shake
[in]inTimeBlend in time duration before shake reached peak value (in seconds)
[in]sustainTimeTime duration for which the shake stays at peak value (in seconds)
[in]outTimeBlend out time duration before shake clears out from peak value (in seconds)

Definition at line 43 of file SCR_CameraShakeManagerComponent.c.

◆ DoAddCameraShake() [2/2]

void DoAddCameraShake ( SCR_BaseCameraShakeProgress  instance)

Adds custom scripted camera shake that will be progressed, applied and then withdrawn from the manager.

Parameters
[in]instanceThe shake to add

Definition at line 70 of file SCR_CameraShakeManagerComponent.c.

◆ DoApplyCameraShake()

void DoApplyCameraShake ( inout vector  matrix[4],
inout float  fov 
)

Applies currently calculated shake to desired camera.

Parameters
[in,out]matrix
[in,out]fov

Definition at line 94 of file SCR_CameraShakeManagerComponent.c.

◆ DoClearCameraShake()

void DoClearCameraShake ( )

Clears all existing camera shake progress(es).

Definition at line 115 of file SCR_CameraShakeManagerComponent.c.

◆ EOnFrame()

override void EOnFrame ( IEntity  owner,
float  timeSlice 
)

Definition at line 149 of file SCR_CameraShakeManagerComponent.c.

Variable Documentation

◆ CAMERA_SHAKE_INSTANCES

const int CAMERA_SHAKE_INSTANCES = 16

Array of pre-cached generic shakes.

Definition at line 14 of file SCR_CameraShakeManagerComponent.c.

◆ m_aAdditionalInstances

ref array<ref SCR_BaseCameraShakeProgress> m_aAdditionalInstances = {}

Array of custom shakes.

Definition at line 18 of file SCR_CameraShakeManagerComponent.c.

◆ m_aShakeInstances

◆ m_fFovScale

protected float m_fFovScale

Definition at line 11 of file SCR_CameraShakeManagerComponent.c.

◆ m_mShakeMatrix

This manager allows adding camera shake that is updated automatically and can be applied to any transform via provided API.

Immediate shake transformation matrix