Arma Reforger Script API
|
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 | |
ScriptInvoker | 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. | |
void | Init () |
initialization | |
void | OnCameraActivate () |
activation | |
void | OnCameraDeactivate () |
deactivation | |
int | CameraSelector () |
selects next camera | |
void | OnBeforeCameraUpdate (float pDt, bool pIsKeyframe) |
before camera update | |
void | OnAfterCameraUpdate (float pDt, bool pIsKeyframe, inout vector transformMS[4], inout vector transformWS[4]) |
after camera update | |
void | CollisionSolver (float pDt, inout ScriptedCameraItemResult pOutResult, inout vector resCamTM[4], bool isKeyframe) |
collision solver | |
void | OnThirdPersonSwitch (bool isInThirdPerson) |
when we switch between FPP and TPP | |
float | GetCameraTransitionTime (int pFrom, int pTo) |
get how long should transition between given cameras be | |
float | GetOverlayCameraFOVScalarWeight () |
Weight in the <0, 1> range of how much input sensitivity should be modulated if an overlay camera is active. | |
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. | |
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 ScriptInvoker | m_OnThirdPersonSwitch = new ScriptInvoker() |
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 |
void SCR_CharacterCameraHandlerComponent.SCR_CharacterCameraHandlerComponent | ( | IEntityComponentSource | src, |
IEntity | ent, | ||
IEntity | parent | ||
) |
[in] | src | |
[in] | ent | |
[in] | parent |
void SCR_CharacterCameraHandlerComponent.AddShakeToToTransform | ( | inout vector | transform[4], |
inout float | fieldOfView | ||
) |
[in,out] | transform | |
[in,out] | fieldOfView |
float SCR_CharacterCameraHandlerComponent.AddViewBobToTransform | ( | inout vector | pOutTransform[4], |
float | pBobScale, | ||
bool | pAllowTranslation | ||
) |
[in,out] | pOutTransform | |
[in] | pBobScale | |
[in] | pAllowTranslation |
|
protected |
Calculate and return desired fov scalar.
1.0 = normal
mainCamera | Main camera used, usually player camera |
overlayCamera | Overlay camera, usually PiP camera or null |
Implements CameraHandlerComponent.
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.
|
protected |
bool SCR_CharacterCameraHandlerComponent.CheckIsInTurret | ( | out bool | isInAds | ) |
[out] | isInAds |
bool SCR_CharacterCameraHandlerComponent.CheckVehicleADS | ( | ) |
override void SCR_CharacterCameraHandlerComponent.CollisionSolver | ( | float | pDt, |
inout ScriptedCameraItemResult | pOutResult, | ||
inout vector | resCamTM[4], | ||
bool | isKeyframe | ||
) |
collision solver
Implements CameraHandlerComponent.
override float SCR_CharacterCameraHandlerComponent.GetCameraTransitionTime | ( | int | pFrom, |
int | pTo | ||
) |
get how long should transition between given cameras be
Implements CameraHandlerComponent.
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.
SCR_RecoilCameraShakeParams SCR_CharacterCameraHandlerComponent.GetRecoilShakeParams | ( | ) |
ScriptInvoker SCR_CharacterCameraHandlerComponent.GetThirdPersonSwitchInvoker | ( | ) |
override void SCR_CharacterCameraHandlerComponent.Init | ( | ) |
initialization
Implements CameraHandlerComponent.
bool SCR_CharacterCameraHandlerComponent.Is3rdPersonView | ( | ) |
bool SCR_CharacterCameraHandlerComponent.IsCameraActive | ( | ) |
bool SCR_CharacterCameraHandlerComponent.IsDebugView | ( | ) |
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.
void SCR_CharacterCameraHandlerComponent.OnAlphatestChange | ( | int | a | ) |
[in] | a |
override void SCR_CharacterCameraHandlerComponent.OnBeforeCameraUpdate | ( | float | pDt, |
bool | pIsKeyframe | ||
) |
before camera update
Implements CameraHandlerComponent.
override void SCR_CharacterCameraHandlerComponent.OnCameraActivate | ( | ) |
activation
Implements CameraHandlerComponent.
override void SCR_CharacterCameraHandlerComponent.OnCameraDeactivate | ( | ) |
deactivation
Implements CameraHandlerComponent.
void SCR_CharacterCameraHandlerComponent.OnCameraSwitchPressed | ( | ) |
override void SCR_CharacterCameraHandlerComponent.OnThirdPersonSwitch | ( | bool | isInThirdPerson | ) |
when we switch between FPP and TPP
Implements CameraHandlerComponent.
|
static |
[in] | sensitivity |
|
static |
[in] | fov |
|
protected |
void SCR_CharacterCameraHandlerComponent.UpdateHeadVisibility | ( | vector | cameraPositionWS | ) |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Progress of recoil based camera shake.
|
protected |
|
staticprotected |
|
staticprotected |