Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
CharacterCameraADS Interface Reference
Inheritance diagram for CharacterCameraADS:
[legend]

Public Member Functions

void CharacterCameraADS (CameraHandlerComponent pCameraHandler)
 how far back can camera move with weapon
 
override void OnDeactivate (ScriptedCameraItem pNextCamera)
 
override void OnBlendIn ()
 
override void OnBlendOut ()
 
override void OnActivate (ScriptedCameraItem pPrevCamera, ScriptedCameraItemResult pPrevCameraResult)
 this overrides freelook for cameras
 
override void OnUpdate (float pDt, out ScriptedCameraItemResult pOutResult)
 virtual callback - called each frame
 
bool IsProneStance ()
 
bool IsProneADS ()
 
- Public Member Functions inherited from CharacterCameraBase
void CharacterCameraBase (CameraHandlerComponent pCameraHandler)
 constructor
 
float UpdateUDAngle (out float pAngle, float pMin, float pMax, float pDt)
 
float UpdateLRAngle (float pAngle, float pMin, float pMax, float pDt)
 
override void OnUpdate (float pDt, out ScriptedCameraItemResult pOutResult)
 virtual callback - called each frame
 
override void OnActivate (ScriptedCameraItem pPrevCamera, ScriptedCameraItemResult pPrevCameraResult)
 this overrides freelook for cameras
 
void ForceFreelook (bool state)
 
int GetShoulderLastActive ()
 Get last 3rd person shoulder state.
 
float GetShoulderDistance ()
 
float GetInterpolatedUDTransformAngle (float pDt)
 
void AddPitchRoll (vector yawPitchRoll, float pitchFactor, float rollFactor, inout vector transformMS[4])
 
override void SetBaseAngles (out vector angles)
 Sets the camera angles in DEG, useful when switching between cameras and changing orientation of the character.
 
override vector GetBaseAngles ()
 helper to blend between cameras ret[0] - up down angle ret[1] - left right angle ret[2] - roll
 
- Public Member Functions inherited from ScriptedCameraItem
void ScriptedCameraItem (CameraHandlerComponent pCameraHandler)
 
override void OnActivate (ScriptedCameraItem pPrevCamera, ScriptedCameraItemResult pPrevCameraResult)
 this overrides freelook for cameras
 
override void OnBlendIn ()
 
override void OnBlendOut ()
 
override void OnUpdate (float pDt, out ScriptedCameraItemResult pOutResult)
 virtual callback - called each frame
 
void OnAfterCameraUpdate (float pDt, bool pIsKeyframe, inout vector transformMS[4])
 
vector GetBaseAngles ()
 helper to blend between cameras ret[0] - up down angle ret[1] - left right angle ret[2] - roll
 
override void SetBaseAngles (out vector angles)
 Sets the camera angles in DEG, useful when switching between cameras and changing orientation of the character.
 
float GetBaseFOV ()
 
void OnActivate (ScriptedCameraItem pPrevCamera, ScriptedCameraItemResult pPrevCameraResult)
 virtual callback - called when camera is created
 
void OnDeactivate (ScriptedCameraItem pNextCamera)
 
void OnBlendIn ()
 
void OnBlendOut ()
 
void OnUpdate (float pDt, out ScriptedCameraItemResult pOutResult)
 virtual callback - called each frame
 
void SetBaseAngles (out vector angles)
 Sets the camera angles in DEG, useful when switching between cameras and changing orientation of the character.
 

Public Attributes

ref ADSCameraData m_pCameraData = new ADSCameraData()
 

Static Public Attributes

static const float CONST_UD_MIN = -89.0
 down limit
 
static const float CONST_UD_MAX = 89.0
 up limit
 
static const float CONST_LR_MIN = -160.0
 left limit
 
static const float CONST_LR_MAX = 160.0
 right limit
 
static const float CONST_TRANSLATIONZ_MIN = -0.1
 

Protected Member Functions

float GetSightsADSActivationPercentage ()
 
float GetSightsADSDeactivationPercentage ()
 
void OnBlendingIn (float blendAlpha)
 
void OnBlendingOut (float blendAlpha)
 
void SolveCameraHeadAttach (ADSCameraData cameraData, out ScriptedCameraItemResult pOutResult)
 
void SolveNewMethod (ADSCameraData cameraData, out ScriptedCameraItemResult pOutResult, float pDt, bool allowInterpolation)
 Stable ADS camera solver that used RightHandProp as camera root.
 
void SolveCameraHandAttach (ADSCameraData cameraData, out ScriptedCameraItemResult pOutResult, float pDt, bool allowInterpolation)
 
void SolveCamera2DSight (ADSCameraData cameraData, out ScriptedCameraItemResult pOutResult)
 
- Protected Member Functions inherited from CharacterCameraBase
void AddVehiclePitchRoll (IEntity vehicle, float pDt, inout vector transformMS[4])
 
TNodeId GetCameraBoneIndex ()
 Since camera bone is animated only in certain situations we want to provide camera bone whenever it is requested by animation otherwise we provide head bone to reduce amount of work animators need to do in order to make camera bone following head bone.
 

Protected Attributes

BaseWeaponManagerComponent m_WeaponManager
 
BaseWeaponComponent m_LastWeaponComponent
 
CharacterAimingComponent m_AimingComponent
 
BaseSightsComponent m_BinocularSight
 
BaseSightsComponent m_LastSightsComponent
 
vector m_vLastSightMS [4]
 
vector m_vLastSightStMS [4]
 
float m_fLastSightFOV
 
float m_fLastSightStFOV
 
bool m_bLastSightsBlend
 
float m_fLastSightsBlendTime
 
float m_fLastSightsBlendDuration = 0.15
 
int m_iHandBoneIndex
 hand bone
 
int m_iHeadBoneIndex
 head bone
 
AnimationTagID m_iJumpAnimTagId
 
vector m_OffsetLS
 position offset
 
float m_fADSToFPSDeg
 freelook degrees for transitioning into fps pos
 
float m_fFreelookFOV
 
vector m_lastStablePos
 
float m_fStabilizerAlpha = 0.0
 
float m_fStabilizerAlphaVel = 0.0
 
bool m_bWasStabilizedLastFrame = false
 
float m_fFreelookBlendAlpha
 
- Protected Attributes inherited from CharacterCameraBase
float m_fUpDownAngle
 runtime values
 
float m_fUpDownAngleAdd
 up down angle in rad
 
float m_fLeftRightAngle = 0.0
 left right angle in rad
 
float m_fFOV
 
float m_fLRAngleVel
 
float m_fUDAngleVel
 
float m_fTransformUDAngleVel
 
float m_fTransformUDAngle
 
bool m_bForceFreeLook
 
bool m_bLRAngleNoLimit
 
bool m_bIgnoreCharacterPitch
 
float m_fFOVFilter
 
float m_fFOVFilterVel
 
int m_fShoulderLastActive = 1
 saved active shoulder for 3rd person cam (1 - right, -1 left)
 
float m_fRollFactor
 
float m_fRollSmooth
 
float m_fRollSmoothVel
 
float m_fPitchFactor
 
float m_fPitchSmooth
 
float m_fPitchSmoothVel
 
ChimeraCharacter m_OwnerCharacter
 
SCR_CharacterControllerComponent m_ControllerComponent
 
CharacterInputContext m_Input
 
SCR_CharacterCameraHandlerComponent m_CharacterCameraHandler
 
CharacterAnimationComponent m_CharacterAnimationComponent
 
CharacterHeadAimingComponent m_CharacterHeadAimingComponent
 
CharacterCommandWeapon m_CommandWeapons
 
CompartmentAccessComponent m_CompartmentAccessComponent
 
CharacterCommandHandlerComponent m_CmdHandler
 
float m_fShakeProgress
 
float m_fShakeVelocity
 
- Protected Attributes inherited from ScriptedCameraItem
CameraHandlerComponent m_CameraHandler
 data
 

Static Protected Attributes

const float CAMERA_INTERP = 0.6
 
const float CAMERA_RECOIL_LIMIT = 0.25
 Maximum amount of recoil applied to camera from weapon in meters.
 
- Static Protected Attributes inherited from CharacterCameraBase
static TNodeId sm_iCameraBoneIndex = -1
 
static TNodeId sm_iHeadBoneIndex = -1
 
static TNodeId s_iNeckBoneIndex = -1
 
static AnimationTagID sm_TagFPCamera = -1
 
static AnimationTagID sm_TagLyingCamera = -1
 
static AnimationTagID sm_TagItemUpdateCols = -1
 
static AnimationTagID sm_TagADSTransitionOut = -1
 
static AnimationTagID sm_TagADSTransitionIn = -1
 

Constructor & Destructor Documentation

◆ CharacterCameraADS()

void CharacterCameraADS.CharacterCameraADS ( CameraHandlerComponent  pCameraHandler)

how far back can camera move with weapon

Parameters
pCameraHandler

Member Function Documentation

◆ GetSightsADSActivationPercentage()

float CharacterCameraADS.GetSightsADSActivationPercentage ( )
protected

◆ GetSightsADSDeactivationPercentage()

float CharacterCameraADS.GetSightsADSDeactivationPercentage ( )
protected

◆ IsProneADS()

bool CharacterCameraADS.IsProneADS ( )

◆ IsProneStance()

bool CharacterCameraADS.IsProneStance ( )

◆ OnActivate()

override void CharacterCameraADS.OnActivate ( ScriptedCameraItem  pPrevCamera,
ScriptedCameraItemResult  pPrevCameraResult 
)

this overrides freelook for cameras

virtual callback - called when camera is created

Implements CharacterCameraBase.

◆ OnBlendIn()

override void CharacterCameraADS.OnBlendIn ( )

Implements ScriptedCameraItem.

Implemented in CharacterCameraADSVehicle.

◆ OnBlendingIn()

void CharacterCameraADS.OnBlendingIn ( float  blendAlpha)
protected

Implemented in CharacterCameraADSVehicle.

◆ OnBlendingOut()

void CharacterCameraADS.OnBlendingOut ( float  blendAlpha)
protected

Implemented in CharacterCameraADSVehicle.

◆ OnBlendOut()

override void CharacterCameraADS.OnBlendOut ( )

Implements ScriptedCameraItem.

Implemented in CharacterCameraADSVehicle.

◆ OnDeactivate()

override void CharacterCameraADS.OnDeactivate ( ScriptedCameraItem  pNextCamera)

◆ OnUpdate()

override void CharacterCameraADS.OnUpdate ( float  pDt,
out ScriptedCameraItemResult  pOutResult 
)

virtual callback - called each frame

update angles

update fov

yaw pitch roll vector

Prepare data

Fetch sights transformation

Recalculate FOV

Fetch zeroing data

Implements CharacterCameraBase.

Implemented in CharacterCameraADSVehicle.

◆ SolveCamera2DSight()

void CharacterCameraADS.SolveCamera2DSight ( ADSCameraData  cameraData,
out ScriptedCameraItemResult  pOutResult 
)
protected

clamp fov so sights FOV is never greater than current fov?

sights transform relative to hand bone

sights in relation to hand

apply position

setup camera props

◆ SolveCameraHandAttach()

void CharacterCameraADS.SolveCameraHandAttach ( ADSCameraData  cameraData,
out ScriptedCameraItemResult  pOutResult,
float  pDt,
bool  allowInterpolation 
)
protected

In some cases this compensation is needed (sloped surfaces)

Sights transform relative to the head

Fetch desired portion of recoil

Local head plane offset by the recoil portion

Project sights onto head plane

Get end position rel. to hand

Apply props

◆ SolveCameraHeadAttach()

void CharacterCameraADS.SolveCameraHeadAttach ( ADSCameraData  cameraData,
out ScriptedCameraItemResult  pOutResult 
)
protected

In some cases this compensation is needed (sloped surfaces)

Sights transform relative to the head

Fetch desired portion of recoil

Local head plane offset by the recoil portion

Set matrix rotation

Project sights onto head plane

Apply props

◆ SolveNewMethod()

void CharacterCameraADS.SolveNewMethod ( ADSCameraData  cameraData,
out ScriptedCameraItemResult  pOutResult,
float  pDt,
bool  allowInterpolation 
)
protected

Stable ADS camera solver that used RightHandProp as camera root.

Fetch desired portion of recoil

Member Data Documentation

◆ CAMERA_INTERP

const float CharacterCameraADS.CAMERA_INTERP = 0.6
staticprotected

◆ CAMERA_RECOIL_LIMIT

const float CharacterCameraADS.CAMERA_RECOIL_LIMIT = 0.25
staticprotected

Maximum amount of recoil applied to camera from weapon in meters.

◆ CONST_LR_MAX

const float CharacterCameraADS.CONST_LR_MAX = 160.0
static

right limit

◆ CONST_LR_MIN

const float CharacterCameraADS.CONST_LR_MIN = -160.0
static

left limit

◆ CONST_TRANSLATIONZ_MIN

const float CharacterCameraADS.CONST_TRANSLATIONZ_MIN = -0.1
static

◆ CONST_UD_MAX

const float CharacterCameraADS.CONST_UD_MAX = 89.0
static

up limit

◆ CONST_UD_MIN

const float CharacterCameraADS.CONST_UD_MIN = -89.0
static

down limit

◆ m_AimingComponent

CharacterAimingComponent CharacterCameraADS.m_AimingComponent
protected

◆ m_BinocularSight

BaseSightsComponent CharacterCameraADS.m_BinocularSight
protected

◆ m_bLastSightsBlend

bool CharacterCameraADS.m_bLastSightsBlend
protected

◆ m_bWasStabilizedLastFrame

bool CharacterCameraADS.m_bWasStabilizedLastFrame = false
protected

◆ m_fADSToFPSDeg

float CharacterCameraADS.m_fADSToFPSDeg
protected

freelook degrees for transitioning into fps pos

◆ m_fFreelookBlendAlpha

float CharacterCameraADS.m_fFreelookBlendAlpha
protected

◆ m_fFreelookFOV

float CharacterCameraADS.m_fFreelookFOV
protected

◆ m_fLastSightFOV

float CharacterCameraADS.m_fLastSightFOV
protected

◆ m_fLastSightsBlendDuration

float CharacterCameraADS.m_fLastSightsBlendDuration = 0.15
protected

◆ m_fLastSightsBlendTime

float CharacterCameraADS.m_fLastSightsBlendTime
protected

◆ m_fLastSightStFOV

float CharacterCameraADS.m_fLastSightStFOV
protected

◆ m_fStabilizerAlpha

float CharacterCameraADS.m_fStabilizerAlpha = 0.0
protected

◆ m_fStabilizerAlphaVel

float CharacterCameraADS.m_fStabilizerAlphaVel = 0.0
protected

◆ m_iHandBoneIndex

int CharacterCameraADS.m_iHandBoneIndex
protected

hand bone

◆ m_iHeadBoneIndex

int CharacterCameraADS.m_iHeadBoneIndex
protected

head bone

◆ m_iJumpAnimTagId

AnimationTagID CharacterCameraADS.m_iJumpAnimTagId
protected

◆ m_LastSightsComponent

BaseSightsComponent CharacterCameraADS.m_LastSightsComponent
protected

◆ m_lastStablePos

vector CharacterCameraADS.m_lastStablePos
protected

◆ m_LastWeaponComponent

BaseWeaponComponent CharacterCameraADS.m_LastWeaponComponent
protected

◆ m_OffsetLS

vector CharacterCameraADS.m_OffsetLS
protected

position offset

◆ m_pCameraData

ref ADSCameraData CharacterCameraADS.m_pCameraData = new ADSCameraData()

◆ m_vLastSightMS

vector CharacterCameraADS.m_vLastSightMS[4]
protected

◆ m_vLastSightStMS

vector CharacterCameraADS.m_vLastSightStMS[4]
protected

◆ m_WeaponManager

BaseWeaponManagerComponent CharacterCameraADS.m_WeaponManager
protected

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