Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_ATLManualCameraComponent.c
Go to the documentation of this file.
1
2
9
[
BaseContainerProps
(), SCR_BaseManualCameraComponentTitle()]
10
class
SCR_ATLManualCameraComponent
:
SCR_BaseManualCameraComponent
11
{
12
[
Attribute
(defvalue:
"5"
,
desc
:
"Below this height, camera copies terrain height precisely."
)]
13
private
int
m_fATLMinHeight;
14
15
[
Attribute
(defvalue:
"50"
,
desc
:
"When the camera is above this height, it moves ASL, not ATL."
)]
16
private
int
m_fATLMaxHeight;
17
18
//------------------------------------------------------------------------------------------------
19
override
void
EOnCameraFrame(
SCR_ManualCameraParam
param)
20
{
21
if
(!param.isDirty)
22
return
;
23
24
float
vertical =
m_InputManager
.GetActionValue(
"ManualCameraMoveVertical"
);
25
if
(vertical != 0.0)
26
return
;
27
28
//--- Get target height
29
vector
pos = param.transform[3];
30
float
height =
Math
.AbsFloat(pos[1] -
Math
.Max(param.
world
.GetSurfaceY(pos[0], pos[2]), 0));
31
32
//--- Terminate when the height is above threshold
33
if
(height > m_fATLMaxHeight)
34
return
;
35
36
//--- Get original height
37
vector
posOrig = param.transformOriginal[3];
38
float
heightOrig =
Math
.AbsFloat(posOrig[1] -
Math
.Max(param.
world
.GetSurfaceY(posOrig[0], posOrig[2]), 0));
39
40
//--- Get interpolated height between min and max
41
float
progress =
Math
.Clamp(
Math
.InverseLerp(m_fATLMinHeight, m_fATLMaxHeight, height), 0.0, 1.0);
42
float
heightInterpolated =
Math
.Lerp(heightOrig - height, 0, progress);
43
44
//--- Apply manual input
45
float
inputDiff = 0;
46
if
(param.isManualInput)
47
inputDiff = pos[1] - posOrig[1];
48
49
//--- Apply transormation
50
pos[1] = pos[1] + heightInterpolated + inputDiff;
51
param.transform[3] = pos;
52
}
53
54
//------------------------------------------------------------------------------------------------
55
override
bool
EOnCameraInit
()
56
{
57
return
true
;
58
}
59
}
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
Math
Definition
Math.c:13
SCR_ATLManualCameraComponent
Definition
SCR_ATLManualCameraComponent.c:11
SCR_BaseManualCameraComponent
Parent class from which all SCR_ManualCamera components inherit.
Definition
SCR_BaseManualCameraComponent.c:6
SCR_BaseManualCameraComponent::EOnCameraInit
bool EOnCameraInit()
SCR_BaseManualCameraComponent::m_InputManager
InputManager m_InputManager
Definition
SCR_BaseManualCameraComponent.c:20
SCR_ManualCameraParam
Parameter for carrying information between individual camera components.
Definition
SCR_ManualCameraParam.c:6
SCR_ManualCameraParam::world
BaseWorld world
World in which the camera exists.
Definition
SCR_ManualCameraParam.c:10
vector
Definition
vector.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
Camera
Components
SCR_ATLManualCameraComponent.c
Generated by
1.17.0