4 protected Shape m_DebugShapeBBox;
5 protected Shape m_DebugShapeDirection;
6 protected float m_DebugShapeDirectionDist;
9 override Shape DebugBBoxDraw()
15 if ( m_DebugShapeBBox )
16 m_DebugShapeBBox.Destroy();
20 if (!m_ThisEntityAI.GetCollisionBox(min_max))
23 m_DebugShapeBBox =
Debug.DrawBox(min_max[0], min_max[1]);
33 override void DebugBBoxSetColor(
int color)
35 if ( m_DebugShapeBBox )
37 m_DebugShapeBBox.SetColor(color);
42 override void DebugBBoxDelete()
48 if ( m_DebugShapeBBox )
50 m_DebugShapeBBox.Destroy();
51 m_DebugShapeBBox =
null;
54 if ( !m_DebugShapeDirection && !m_DebugShapeBBox )
61 override Shape DebugDirectionDraw(
float distance = 1)
67 if ( m_DebugShapeDirection )
69 m_DebugShapeDirection.Destroy();
73 vector p2 = m_ThisEntityAI.GetDirection() * m_DebugShapeDirectionDist;
74 m_DebugShapeDirectionDist = distance;
75 m_DebugShapeDirection =
Debug.DrawArrow(p1, p2);
84 override void DebugDirectionDelete()
90 if ( m_DebugShapeDirection )
92 m_DebugShapeDirection.Destroy();
93 m_DebugShapeDirection =
null;
96 if ( !m_DebugShapeDirection && !m_DebugShapeBBox )
108 if ( m_DebugShapeBBox || m_DebugShapeDirection )
111 m_ThisEntityAI.GetTransform(mat);
113 if ( m_DebugShapeBBox )
115 m_DebugShapeBBox.SetMatrix(mat);
118 if ( m_DebugShapeDirection )
120 m_DebugShapeDirection.SetMatrix(mat);