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_RotateRollManualCameraComponent.c
Go to the documentation of this file.
1
2
4
[
BaseContainerProps
(), SCR_BaseManualCameraComponentTitle()]
5
class
SCR_RotateRollManualCameraComponent
:
SCR_BaseManualCameraComponent
6
{
7
protected
static
const
float
INERTIA_THRESHOLD
= 0.001;
8
9
[
Attribute
(defvalue:
"100"
,
desc
:
"Value coefficient."
)]
10
private
float
m_fCoef;
11
12
[
Attribute
(defvalue:
"2"
,
desc
:
"When roll is below this angle, return it back to 0."
)]
13
private
float
m_fMinRoll;
14
15
//------------------------------------------------------------------------------------------------
16
override
void
EOnCameraReset
()
17
{
18
vector
angles
=
GetCameraEntity
().GetAngles();
19
angles
[2] = 0;
20
GetCameraEntity
().SetAngles(
angles
);
21
}
22
23
//------------------------------------------------------------------------------------------------
24
override
void
EOnCameraSave
(
SCR_ManualCameraComponentSave
data
)
25
{
26
vector
angles
=
GetCameraEntity
().GetAngles();
27
if
(
angles
[2] != 0)
28
data
.m_aValues = {
angles
[2]};
29
}
30
31
//------------------------------------------------------------------------------------------------
32
override
void
EOnCameraLoad(SCR_ManualCameraComponentSave
data
)
33
{
34
if
(!
data
.m_aValues ||
data
.m_aValues.IsEmpty())
35
return
;
36
37
vector
angles
=
GetCameraEntity
().GetAngles();
38
angles
[2] =
data
.m_aValues[0];
39
GetCameraEntity
().SetAngles(
angles
);
40
}
41
42
//------------------------------------------------------------------------------------------------
43
override
void
EOnCameraFrame(SCR_ManualCameraParam param)
44
{
45
if
(!param.isManualInputEnabled)
return
;
46
47
float
rotateRoll = 0;
48
if
(
GetInputManager
().IsUsingMouseAndKeyboard() ||
GetInputManager
().GetActionValue(
"ManualCameraModifier"
))
49
rotateRoll =
GetInputManager
().GetActionValue(
"ManualCameraRotateRoll"
);
50
51
if
(rotateRoll != 0)
52
{
53
param.rotDelta[2] = param.rotDelta[2] + rotateRoll * m_fCoef * Math.Max(Math.AbsFloat(param.rotOriginal[2] / 180), 0.1);
54
param.isManualInput =
true
;
55
param.isDirty =
true
;
56
}
57
else
58
{
59
float
rollOriginal = Math.AbsFloat(param.rotOriginal[2]);
60
if
(rollOriginal >
INERTIA_THRESHOLD
&& rollOriginal < m_fMinRoll)
61
{
62
param.rotDelta[2] = -param.rotOriginal[2] * 5;
//--- Multiply to speed up smooth return faciliated by timeSlice multiplication
63
param.isDirty =
true
;
64
}
65
}
66
}
67
68
//------------------------------------------------------------------------------------------------
69
override
bool
EOnCameraInit
()
70
{
71
return
true
;
72
}
73
}
angles
ref array< string > angles
Definition
PrefabImporter.c:22
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
EOnCameraSave
void EOnCameraSave(SCR_ManualCameraComponentSave data)
data
Get all prefabs that have the spawner data
Definition
SCR_EntityCatalogManagerComponent.c:320
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
SCR_BaseManualCameraComponent
Parent class from which all SCR_ManualCamera components inherit.
Definition
SCR_BaseManualCameraComponent.c:6
SCR_BaseManualCameraComponent::GetCameraEntity
SCR_ManualCamera GetCameraEntity()
Definition
SCR_BaseManualCameraComponent.c:64
SCR_BaseManualCameraComponent::EOnCameraReset
void EOnCameraReset()
Camera value are reset.
SCR_BaseManualCameraComponent::EOnCameraInit
bool EOnCameraInit()
SCR_BaseManualCameraComponent::GetInputManager
InputManager GetInputManager()
Definition
SCR_BaseManualCameraComponent.c:70
SCR_ManualCameraComponentSave
Definition
SCR_ManualCameraSave.c:16
SCR_RotateRollManualCameraComponent
Adjust camera field of view.
Definition
SCR_RotateRollManualCameraComponent.c:6
SCR_RotateRollManualCameraComponent::INERTIA_THRESHOLD
static const float INERTIA_THRESHOLD
Definition
SCR_RotateRollManualCameraComponent.c:7
vector
Definition
vector.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
Camera
Components
SCR_RotateRollManualCameraComponent.c
Generated by
1.17.0