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_MoveToCursorManualCameraComponent.c
Go to the documentation of this file.
1
2
4
[
BaseContainerProps
(), SCR_BaseManualCameraComponentTitle()]
5
class
SCR_MoveToCursorManualCameraComponent
:
SCR_BaseManualCameraComponent
6
{
7
[
Attribute
(
"2"
,
UIWidgets
.Auto,
""
)]
8
private
float
m_fSpeed;
9
10
//------------------------------------------------------------------------------------------------
11
override
void
EOnCameraFrame(
SCR_ManualCameraParam
param)
12
{
13
if
(!param.isManualInputEnabled || param.isManualInput || !param.isCursorEnabled)
14
return
;
15
16
float
inputValue =
GetInputManager
().GetActionValue(
"ManualCameraMoveToCursor"
);
17
if
(inputValue == 0)
18
return
;
19
20
WorkspaceWidget
workspace =
GetGame
().GetWorkspace();
21
if
(!workspace)
22
return
;
23
24
// Get mouse position
25
int
mouseX, mouseY;
26
WidgetManager
.GetMousePos(mouseX, mouseY);
27
28
// Get move direction
29
vector
outDir;
30
workspace.ProjScreenToWorld(workspace.DPIUnscale(mouseX), workspace.DPIUnscale(mouseY), outDir,
GetGame
().GetWorld());
31
32
param.transform[3] = param.transform[3] + outDir * inputValue * m_fSpeed *
Math
.Sqrt(param.multiplier.Length());
33
param.isDirty =
true
;
34
param.isManualInput =
true
;
35
}
36
37
//------------------------------------------------------------------------------------------------
38
override
bool
EOnCameraInit
()
39
{
40
return
true
;
41
}
42
}
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
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::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_MoveToCursorManualCameraComponent
Moving the camera to and away from the cursor position.
Definition
SCR_MoveToCursorManualCameraComponent.c:6
UIWidgets
Definition
attributes.c:40
WidgetManager
Definition
WidgetManager.c:16
WorkspaceWidget
Definition
WorkspaceWidget.c:16
vector
Definition
vector.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
Camera
Components
SCR_MoveToCursorManualCameraComponent.c
Generated by
1.17.0