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_LimitBoxManualCameraComponent.c
Go to the documentation of this file.
1
2
4
[
BaseContainerProps
(), SCR_BaseManualCameraComponentTitle()]
5
class
SCR_LimitBoxManualCameraComponent
:
SCR_BaseManualCameraComponent
6
{
7
[
Attribute
(defvalue:
"-2000 -2000 -2000"
)]
8
private
vector
m_vBoundsMin;
9
10
[
Attribute
(defvalue:
"2000 2000 2000"
)]
11
private
vector
m_vBoundsMax;
12
13
[
Attribute
(defvalue:
"1"
,
desc
:
"When true, boundaries are calculated from world boundaries, not from 0,0,0"
)]
14
private
bool
m_RelativeToWorld;
15
16
private
vector
m_vPos;
17
18
//------------------------------------------------------------------------------------------------
19
override
void
EOnCameraFrame(
SCR_ManualCameraParam
param)
20
{
21
if
(!param.isDirty)
return
;
22
23
m_vPos = param.transform[3];
24
m_vPos[0] =
Math
.Clamp(m_vPos[0], m_vBoundsMin[0], m_vBoundsMax[0]);
25
m_vPos[1] =
Math
.Clamp(m_vPos[1], m_vBoundsMin[1], m_vBoundsMax[1]);
26
m_vPos[2] =
Math
.Clamp(m_vPos[2], m_vBoundsMin[2], m_vBoundsMax[2]);
27
param.transform[3] = m_vPos;
28
}
29
30
//------------------------------------------------------------------------------------------------
31
override
bool
EOnCameraInit
()
32
{
33
if
(!m_RelativeToWorld)
return
true
;
34
35
ArmaReforgerScripted
game
=
GetGame
();
36
if
(!
game
)
37
return
false
;
38
39
BaseWorld
world =
game
.GetWorld();
40
if
(!world)
41
return
false
;
42
43
vector
worldBoundBoxMin, worldBoundBoxMax;
44
world.GetBoundBox(worldBoundBoxMin, worldBoundBoxMax);
45
46
m_vBoundsMin += worldBoundBoxMin;
47
m_vBoundsMax += worldBoundBoxMax;
48
49
return
true
;
50
}
51
}
game
ref DSGameConfig game
Definition
DSConfig.c:81
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
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
BaseWorld
Definition
BaseWorld.c:13
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_LimitBoxManualCameraComponent
Limit camera movement within specific box area.
Definition
SCR_LimitBoxManualCameraComponent.c:6
SCR_ManualCameraParam
Parameter for carrying information between individual camera components.
Definition
SCR_ManualCameraParam.c:6
vector
Definition
vector.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
Camera
Components
SCR_LimitBoxManualCameraComponent.c
Generated by
1.17.0