Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_HorizontalAlignComponent.c
Go to the documentation of this file.
1 [ComponentEditorProps(category: "GameScripted/Compositions", description: "If entity is placed in a slot or converted to editableEntity then the system makes sure that the entity is always horizontally aligned")]
2 class SCR_HorizontalAlignComponentClass : ScriptComponentClass
3 {
4 }
5 
6 class SCR_HorizontalAlignComponent : ScriptComponent
7 {
8  //Force horizontal alignment in WB
9  #ifdef WORKBENCH
10  //------------------------------------------------------------------------------------------------
11  override void _WB_SetTransform(IEntity owner, inout vector mat[4], IEntitySource src)
12  {
13  owner.GetWorldTransform(mat);
14  vector angles = Math3D.MatrixToAngles(mat);
15  angles[1] = 0;
16  angles[2] = 0;
17  Math3D.AnglesToMatrix(angles, mat);
18  }
19  #endif
20 }
ComponentEditorProps
SCR_FragmentEntityClass ComponentEditorProps
ScriptComponent
SCR_SiteSlotEntityClass ScriptComponent
SCR_HorizontalAlignComponentClass
Definition: SCR_HorizontalAlignComponent.c:2
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180