5 protected vector m_fOffsetLocal;
8 protected vector m_fOffsetWorld;
10 protected static const string ENTITY_PORT =
"Entity";
11 protected static const string POSITION_PORT =
"Position";
13 override bool VisibleInPalette() {
return true; }
15 override string GetOnHoverDescription()
17 return "Returns position of entity with local and world space offset.";
20 override ENodeResult EOnTaskSimulate(AIAgent owner,
float dt)
22 IEntity myEntity = owner.GetControlledEntity();
25 GetVariableIn(ENTITY_PORT, entity);
26 if (!entity && !myEntity)
27 return ENodeResult.FAIL;
32 vector posOut = entity.CoordToParent(m_fOffsetLocal);
33 posOut = posOut + m_fOffsetWorld;
34 SetVariableOut(POSITION_PORT, posOut);
36 return ENodeResult.SUCCESS;
39 protected static ref TStringArray s_aVarsIn = { ENTITY_PORT };
40 override TStringArray GetVariablesIn() {
return s_aVarsIn; }
42 protected static ref TStringArray s_aVarsOut = { POSITION_PORT };
43 override TStringArray GetVariablesOut() {
return s_aVarsOut; }