Arma Reforger Script API
|
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. | |
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 |
void CharacterCameraADS.CharacterCameraADS | ( | CameraHandlerComponent | pCameraHandler | ) |
how far back can camera move with weapon
pCameraHandler |
|
protected |
|
protected |
bool CharacterCameraADS.IsProneADS | ( | ) |
bool CharacterCameraADS.IsProneStance | ( | ) |
override void CharacterCameraADS.OnActivate | ( | ScriptedCameraItem | pPrevCamera, |
ScriptedCameraItemResult | pPrevCameraResult | ||
) |
this overrides freelook for cameras
virtual callback - called when camera is created
Implements CharacterCameraBase.
override void CharacterCameraADS.OnBlendIn | ( | ) |
Implements ScriptedCameraItem.
Implemented in CharacterCameraADSVehicle.
|
protected |
Implemented in CharacterCameraADSVehicle.
|
protected |
Implemented in CharacterCameraADSVehicle.
override void CharacterCameraADS.OnBlendOut | ( | ) |
Implements ScriptedCameraItem.
Implemented in CharacterCameraADSVehicle.
override void CharacterCameraADS.OnDeactivate | ( | ScriptedCameraItem | pNextCamera | ) |
Implements BaseScriptedCameraItem.
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.
|
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
|
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
|
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
|
protected |
Stable ADS camera solver that used RightHandProp as camera root.
Fetch desired portion of recoil
|
staticprotected |
|
staticprotected |
Maximum amount of recoil applied to camera from weapon in meters.
|
static |
right limit
|
static |
left limit
|
static |
|
static |
up limit
|
static |
down limit
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
freelook degrees for transitioning into fps pos
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
hand bone
|
protected |
head bone
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
position offset
ref ADSCameraData CharacterCameraADS.m_pCameraData = new ADSCameraData() |
|
protected |
|
protected |
|
protected |