public virtual void DebugDraw() { if (AgentEntity == null) { return; } m_navigation.DebugDraw(); var aiTarget = m_actions.AiTargetBase as MyAiTargetBase; if (aiTarget != null) { if (aiTarget.HasTarget()) { VRageRender.MyRenderProxy.DebugDrawPoint(aiTarget.TargetPosition, Color.Aquamarine, false); if (BotEntity != null && aiTarget.TargetEntity != null) { var markerPos = BotEntity.PositionComp.WorldAABB.Center; markerPos.Y += BotEntity.PositionComp.WorldAABB.HalfExtents.Y + 0.2f; VRageRender.MyRenderProxy.DebugDrawText3D(markerPos, string.Format("Target:{0}", aiTarget.TargetEntity.ToString()), Color.Red, 1f, false, MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_TOP); } } } m_botLogic.DebugDraw(); }
public void Update() { if (m_player.Controller.ControlledEntity != null) { var controlledEntity = m_player.Controller.ControlledEntity.Entity; if (controlledEntity != null) { m_navigation.Update(); m_navigation.DebugDraw(); if (MyDebugDrawSettings.ENABLE_DEBUG_DRAW) { VRageRender.MyRenderProxy.DebugDrawSphere(m_navigation.PositionAndOrientation.Translation, 0.15f, Color.White.ToVector3(), 1.0f, false); } if (BehaviorTree != null) { BehaviorTree.Tick(this); } } } }
public virtual void DebugDraw() { if (AgentEntity == null) { return; } m_navigation.DebugDraw(); var aiTarget = m_actions.AiTarget as MyAiTargetBase; if (aiTarget != null) { if (aiTarget.HasTarget()) { VRageRender.MyRenderProxy.DebugDrawPoint(aiTarget.TargetPosition, Color.Aquamarine, false); } } m_botLogic.DebugDraw(); }