Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
AttachBonePositionTrackModifier.c
Go to the documentation of this file.
1
class
AttachBonePositionTrackModifier
:
CinematicTrackModifier
2
{
3
[
Attribute
(defvalue:
""
,
desc
:
"Entity we want be attached to"
)]
4
string
entityToAttach;
5
6
[
Attribute
(defvalue:
""
,
desc
:
"Bone we want be attached to"
)]
7
string
boneToAttach;
8
9
[
Attribute
(defvalue:
"false"
,
desc
:
"If we want to rotate with parent"
)]
10
bool
applyRotation;
11
12
vector
transform[4];
13
vector
boneTransform[4];
14
vector
originalVector[4];
15
ChimeraWorld
chimeraWorld;
16
17
override
void
OnInit
(
World
world)
18
{
19
chimeraWorld = world;
20
}
21
22
override
vector
OnApplyModifierVector(
float
time,
vector
originalValue)
23
{
24
25
IEntity
entity = chimeraWorld.FindEntityByName(entityToAttach);
26
27
if
(!entity)
28
return
originalValue;
29
30
entity.
GetTransform
(transform);
31
32
if
(boneToAttach !=
""
)
//attach to bone
33
{
34
Animation
entityAnimation = entity.
GetAnimation
();
35
36
if
(!entityAnimation)
37
return
originalValue;
38
39
TNodeId
boneId = entityAnimation.GetBoneIndex(boneToAttach);
40
41
if
(boneId == -1)
42
return
originalValue;
43
44
entityAnimation.GetBoneMatrix(boneId, boneTransform);
45
Math3D
.MatrixMultiply4(transform, boneTransform, transform);
46
47
if
(applyRotation)
48
{
49
originalVector = {
"1 0 0"
,
"0 1 0"
,
"0 0 1"
, originalValue};
50
Math3D
.MatrixMultiply4(transform, originalVector, transform);
51
52
return
transform[3];
53
}
54
else
55
{
56
return
transform[3] + originalValue;
57
}
58
}
59
60
return
originalValue;
61
}
62
};
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
Animation
Definition
Animation.c:13
AttachBonePositionTrackModifier
Definition
AttachBonePositionTrackModifier.c:2
ChimeraWorld
Definition
ChimeraWorld.c:13
CinematicTrackModifier
Definition
CinematicTrackModifier.c:8
IEntity
Definition
IEntity.c:13
IEntity::GetAnimation
proto external Animation GetAnimation()
IEntity::GetTransform
proto external void GetTransform(out vector mat[])
Math3D
Definition
Math3D.c:13
World
Definition
World.c:16
vector
Definition
vector.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
TNodeId
int TNodeId
Node global id is a hash of name of the node.
Definition
EnEntity.c:18
OnInit
@ OnInit
Definition
SndComponentCallbacks.c:17
scripts
Game
Cinematics
AttachBonePositionTrackModifier.c
Generated by
1.17.0