public virtual void DebugDraw(ref Matrix drawMatrix)
        {
            if (!MyDebugDrawSettings.ENABLE_DEBUG_DRAW)
            {
                return;
            }

            if (MyDebugDrawSettings.DEBUG_DRAW_NAVMESHES != MyWEMDebugDrawMode.NONE)
            {
                m_mesh.DebugDraw(ref drawMatrix, MyDebugDrawSettings.DEBUG_DRAW_NAVMESHES);
                m_mesh.CustomDebugDrawFaces(ref drawMatrix, MyDebugDrawSettings.DEBUG_DRAW_NAVMESHES, (obj) => (obj as MyNavigationTriangle).Index.ToString());
            }

            //VRageRender.MyRenderProxy.DebugDrawText2D(new Vector2(0.0f, 0.0f), "Navmesh size approximation: " + ApproximateMemoryFootprint() + "B", Color.Yellow, 1.0f);

            if (MyFakes.DEBUG_DRAW_FUNNEL)
            {
                VRageRender.MyRenderProxy.DebugDrawSphere(Vector3.Transform(m_vertex, drawMatrix), 0.05f, Color.Yellow.ToVector3(), 1.0f, false);
                VRageRender.MyRenderProxy.DebugDrawSphere(Vector3.Transform(m_vertex + m_normal, drawMatrix), 0.05f, Color.Orange.ToVector3(), 1.0f, false);
                VRageRender.MyRenderProxy.DebugDrawSphere(Vector3.Transform(m_left, drawMatrix), 0.05f, Color.Red.ToVector3(), 1.0f, false);
                VRageRender.MyRenderProxy.DebugDrawSphere(Vector3.Transform(m_right, drawMatrix), 0.05f, Color.Green.ToVector3(), 1.0f, false);

                foreach (var point in m_debugPointsLeft)
                {
                    VRageRender.MyRenderProxy.DebugDrawSphere(Vector3.Transform(point, drawMatrix), 0.03f, Color.Red.ToVector3(), 1.0f, false);
                }
                foreach (var point in m_debugPointsRight)
                {
                    VRageRender.MyRenderProxy.DebugDrawSphere(Vector3.Transform(point, drawMatrix), 0.04f, Color.Green.ToVector3(), 1.0f, false);
                }

                Vector3?prevPoint = null;
                if (m_path != null)
                {
                    foreach (var point in m_path)
                    {
                        Vector3 pointWorld = Vector3.Transform(point, drawMatrix);
                        VRageRender.MyRenderProxy.DebugDrawSphere(pointWorld + Vector3.Up * 0.2f, 0.02f, Color.Orange.ToVector3(), 1.0f, false);
                        if (prevPoint.HasValue)
                        {
                            VRageRender.MyRenderProxy.DebugDrawLine3D(prevPoint.Value + Vector3.Up * 0.2f, pointWorld + Vector3.Up * 0.2f, Color.Orange, Color.Orange, true);
                        }

                        prevPoint = pointWorld;
                    }
                }
                prevPoint = null;
                if (m_path2 != null)
                {
                    foreach (var point in m_path2)
                    {
                        Vector3 pointWorld = Vector3.Transform(point, drawMatrix);
                        if (prevPoint.HasValue)
                        {
                            VRageRender.MyRenderProxy.DebugDrawLine3D(prevPoint.Value + Vector3.Up * 0.1f, pointWorld + Vector3.Up * 0.1f, Color.Violet, Color.Violet, true);
                        }

                        prevPoint = pointWorld;
                    }
                }

                if (m_debugFunnel.Count > 0)
                {
                    var section = m_debugFunnel[m_debugFunnelIdx % m_debugFunnel.Count];
                    var a       = Vector3.Transform(section.Apex, drawMatrix);
                    var l       = Vector3.Transform(section.Left, drawMatrix);
                    var r       = Vector3.Transform(section.Right, drawMatrix);
                    l = a + (l - a) * 10.0f;
                    r = a + (r - a) * 10.0f;
                    Color c = Color.Cyan;
                    VRageRender.MyRenderProxy.DebugDrawLine3D(a + Vector3.Up * 0.1f, l + Vector3.Up * 0.1f, c, c, true);
                    VRageRender.MyRenderProxy.DebugDrawLine3D(a + Vector3.Up * 0.1f, r + Vector3.Up * 0.1f, c, c, true);
                }
            }
        }