Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_OrientToSeaNormalContextAction.c
Go to the documentation of this file.
3{
4 override bool CanBeShown(SCR_EditableEntityComponent selectedEntity, vector cursorWorldPosition, int flags)
5 {
6 return selectedEntity != null;
7 }
8
9 override bool CanBePerformed(SCR_EditableEntityComponent selectedEntity, vector cursorWorldPosition, int flags)
10 {
11 return true;
12 }
13
14 override void Perform(SCR_EditableEntityComponent selectedEntity, vector cursorWorldPosition)
15 {
16 GenericEntity owner = selectedEntity.GetOwner();
17 if (!owner) return;
18
19 vector transform[4];
20 owner.GetTransform(transform);
21
22 //--- Reset pitch and roll, but preserve yaw
23 vector angles = Math3D.MatrixToAngles(transform);
24 Math3D.AnglesToMatrix(Vector(angles[0], 0, 0), transform);
25
26 owner.SetTransform(transform);
27 }
28};
SCR_EAIThreatSectorFlags flags
ref array< string > angles
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
class SCR_ArsenalGameModeUIDataHolder SCR_BaseContainerCustomTitleUIInfo("m_UIInfo")
proto external bool SetTransform(vector mat[4])
proto external void GetTransform(out vector mat[])
proto native vector Vector(float x, float y, float z)