Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_EditorHoveredManualCameraComponent.c
Go to the documentation of this file.
1 
4 [BaseContainerProps(), SCR_BaseManualCameraComponentTitle()]
6 {
7  private SCR_HoverEditableEntityFilter m_HoverManager;
8  private SCR_PreviewEntityEditorComponent m_PreviewManager;
9 
10  //------------------------------------------------------------------------------------------------
11  override void EOnCameraFrame(SCR_ManualCameraParam param)
12  {
13  if (m_PreviewManager)
14  {
15  IEntity previewEntity = m_PreviewManager.GetPreviewEntity();
16  if (previewEntity)
17  {
18  param.SetCursorWorldPos(previewEntity.GetTransformAxis(3));
19  param.target = previewEntity;
20  return;
21  }
22  }
23 
24  if (m_HoverManager)
25  {
26  bool isDelegate;
27  SCR_EditableEntityComponent entity = m_HoverManager.GetEntityUnderCursor(isDelegate);
28  if (!entity) return;
29 
30  param.target = entity.GetOwner();
31  if (!isDelegate) return;
32 
33  vector pos;
34  if (entity.GetPos(pos)) param.SetCursorWorldPos(pos);
35  }
36  }
37 
38  //------------------------------------------------------------------------------------------------
39  override bool EOnCameraInit()
40  {
43  if (entitiesManager)
44  m_HoverManager = SCR_HoverEditableEntityFilter.Cast(entitiesManager.GetFilter(EEditableEntityState.HOVER));
45 
46  return true;
47  }
48 }
EEditableEntityState
EEditableEntityState
Definition: EEditableEntityState.c:37
SCR_BaseManualCameraComponent
Parent class from which all SCR_ManualCamera components inherit.
Definition: SCR_BaseManualCameraComponent.c:5
m_PreviewManager
private SCR_PreviewEntityEditorComponent m_PreviewManager
Definition: SCR_CursorEditorUIComponent.c:22
SCR_EntitiesManagerEditorComponent
Definition: SCR_EntitiesManagerEditorComponent.c:13
m_HoverManager
SCR_BaseActionsEditorComponentClass m_HoverManager
SCR_EditorHoveredManualCameraComponent
Detect editable entity under cursor.
Definition: SCR_EditorHoveredManualCameraComponent.c:5
SCR_HoverEditableEntityFilter
Definition: SCR_HoverEditableEntityFilter.c:6
SCR_ManualCameraParam
Parameter for carrying information between individual camera components.
Definition: SCR_ManualCameraParam.c:5
SCR_EditableEntityComponent
Definition: SCR_EditableEntityComponent.c:13
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468
SCR_PreviewEntityEditorComponent
Definition: SCR_PreviewEntityEditorComponent.c:12