Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsCinematicTrack.c
Go to the documentation of this file.
1
[
CinematicTrackAttribute
(name:
"Physics Track"
, description:
"Track used for physics"
)]
2
class
PhysicsCinematicTrack
:
CinematicTrackBase
3
{
4
[
Attribute
(
"0 0 0"
)]
5
vector
m_velocity;
6
7
[
Attribute
(
"0 0 0"
)]
8
vector
m_angularVelocity;
9
10
[
CinematicEventAttribute
()]
11
void
playImpulse()
12
{
13
if
(m_GeneralEntity)
14
{
15
vector
velOrig = m_GeneralEntity.GetPhysics().GetVelocity();
16
vector
vel = {velOrig[0] + m_velocity[0], velOrig[1] + m_velocity[1], velOrig[2] + m_velocity[2]};
17
m_GeneralEntity.GetPhysics().SetVelocity(vel);
18
m_GeneralEntity.GetPhysics().SetAngularVelocity(m_angularVelocity);
19
}
20
}
21
22
void
findEntity(
World
world)
23
{
24
// Find particle entity by using name of track
25
TStringArray
strs =
new
TStringArray
;
26
GetTrackName().Split(
"_"
, strs,
true
);
27
28
m_GeneralEntity =
GenericEntity
.Cast(world.FindEntityByName(strs.Get(0)));
29
}
30
31
private
GenericEntity
m_GeneralEntity;
32
private
World
globalWorld;
33
34
override
void
OnInit
(
World
world)
35
{
36
// Find particle entity by using name of track
37
findEntity(world);
38
globalWorld = world;
39
}
40
41
override
void
OnApply(
float
time)
42
{
43
}
44
}
CinematicEventAttribute
void CinematicEventAttribute(string name="")
Definition
attributes.c:18
CinematicTrackAttribute
Definition
attributes.c:3
CinematicTrackBase
Definition
CinematicTrackBase.c:8
GenericEntity
Definition
GenericEntity.c:16
PhysicsCinematicTrack
Definition
PhysicsCinematicTrack.c:3
World
Definition
World.c:16
vector
Definition
vector.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
OnInit
@ OnInit
Definition
SndComponentCallbacks.c:17
TStringArray
array< string > TStringArray
Definition
Types.c:385
scripts
Game
Cinematics
PhysicsCinematicTrack.c
Generated by
1.17.0