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_RotateManualCameraComponent.c
Go to the documentation of this file.
1
2
4
[
BaseContainerProps
(), SCR_BaseManualCameraComponentTitle()]
5
class
SCR_RotateManualCameraComponent
:
SCR_BaseManualCameraComponent
6
{
7
[
Attribute
(
"90"
)]
8
private
float
m_fSpeed;
9
10
private
float
m_fYaw;
11
private
float
m_fPitch;
12
13
//------------------------------------------------------------------------------------------------
14
override
void
EOnCameraFrame(
SCR_ManualCameraParam
param)
15
{
16
if
(!param.isManualInputEnabled)
17
return
;
18
19
float
yaw =
GetInputManager
().GetActionValue(
"ManualCameraRotateYaw"
);
20
float
pitch =
GetInputManager
().GetActionValue(
"ManualCameraRotatePitch"
);
21
22
//--- With mouse, the input is activated only every second frame. Correct it by using previous value.
23
if
(
GetInputManager
().IsUsingMouseAndKeyboard())
24
{
25
float
yawPrev = m_fYaw;
26
m_fYaw = yaw;
27
if
(yaw == 0 && yawPrev != 0) yaw = yawPrev;
28
29
float
pitchPrev = m_fPitch;
30
m_fPitch = pitch;
31
if
(pitch == 0 && pitchPrev != 0) pitch = pitchPrev;
32
}
33
34
if
(yaw == 0 && pitch == 0)
35
return
;
36
37
param.rotDelta +=
Vector
(yaw, pitch, 0) * m_fSpeed * param.fov /
Math
.Max(
GetCameraEntity
().GetDefaultFOV(), 1);
38
param.isManualInput =
true
;
39
param.isDirty =
true
;
40
}
41
42
//------------------------------------------------------------------------------------------------
43
override
bool
EOnCameraInit
()
44
{
45
return
true
;
46
}
47
}
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
Math
Definition
Math.c:13
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::EOnCameraInit
bool EOnCameraInit()
SCR_BaseManualCameraComponent::GetInputManager
InputManager GetInputManager()
Definition
SCR_BaseManualCameraComponent.c:70
SCR_ManualCameraParam
Parameter for carrying information between individual camera components.
Definition
SCR_ManualCameraParam.c:6
SCR_RotateManualCameraComponent
Basic camera rotation.
Definition
SCR_RotateManualCameraComponent.c:6
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
Vector
proto native vector Vector(float x, float y, float z)
scripts
Game
Camera
Components
SCR_RotateManualCameraComponent.c
Generated by
1.17.0