Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
AttachRotationTrackModifier.c
Go to the documentation of this file.
2{
3 [Attribute(defvalue:"", desc:"Entity we want be attached to")]
4 string entityToAttach;
5
6 vector transform[4];
7 vector originalVector[4];
8 ChimeraWorld chimeraWorld;
9
10 override void OnInit(World world)
11 {
12 chimeraWorld = world;
13 }
14
15 override vector OnApplyModifierVector(float time, vector originalValue)
16 {
17
18 IEntity entity = chimeraWorld.FindEntityByName(entityToAttach);
19
20 if (!entity)
21 return originalValue;
22
23 entity.GetTransform(transform);
24
25 Math3D.AnglesToMatrix(originalValue, originalVector);
26 Math3D.MatrixMultiply4(transform, originalVector, transform);
27
28 return Math3D.MatrixToAngles(transform);
29 }
30};
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
proto external void GetTransform(out vector mat[])
Definition World.c:16
SCR_FieldOfViewSettings Attribute