protected override void OnRenderObjectDerived()
    {
        RootSeries.DrawScene    = DrawDebug;
        StyleSeries.DrawScene   = DrawDebug;
        DribbleSeries.DrawScene = DrawDebug;
        ContactSeries.DrawScene = DrawDebug;
        PhaseSeries.DrawScene   = DrawDebug;
        RootSeries.Draw(GetCamera());
        StyleSeries.Draw(GetCamera());
        DribbleSeries.Draw(GetCamera());
        ContactSeries.Draw(GetCamera());
        PhaseSeries.Draw(GetCamera());
        if (DrawDebug)
        {
            if (Carrier && Controller.QueryLogic("Hold") && !Controller.QueryLogic("Move"))
            {
                UltiDraw.Begin();
                int resolution = 100;
                for (int i = 0; i < resolution; i++)
                {
                    Vector3 target = ToHoldTarget(Quaternion.AngleAxis(360f * (float)i / (float)resolution, Vector3.up) * Vector3.forward);
                    UltiDraw.DrawSphere(target.GetRelativePositionFrom(transform.GetWorldMatrix(true)), Quaternion.identity, 0.05f, Color.cyan);
                }
                UltiDraw.DrawSphere(ToHoldTarget(Controller.QueryRightJoystickVector()).GetRelativePositionFrom(transform.GetWorldMatrix(true)), Quaternion.identity, 0.1f, Color.black);
                UltiDraw.End();
            }
        }

        //Debug Collider
        // UltiDraw.Begin();
        // UltiDraw.DrawWireCylinder(Collider.transform.position + new Vector3(0f, Collider.height/4f, 0f), Collider.transform.rotation, 2f*Collider.radius, Collider.height/2f, UltiDraw.Black);
        // UltiDraw.End();
    }
Exemplo n.º 2
0
    protected override void OnRenderObjectDerived()
    {
        RootSeries.DrawScene    = DrawDebug;
        StyleSeries.DrawScene   = DrawDebug;
        ContactSeries.DrawScene = DrawDebug;
        PhaseSeries.DrawScene   = DrawDebug;
        RootSeries.Draw(GetCamera());
        StyleSeries.Draw(GetCamera());
        ContactSeries.Draw(GetCamera());
        PhaseSeries.Draw(GetCamera());

        //Debug Collider
        // UltiDraw.Begin();
        // UltiDraw.DrawWireCylinder(Collider.transform.position + new Vector3(0f, Collider.height/4f, 0f), Collider.transform.rotation, 2f*Collider.radius, Collider.height/2f, UltiDraw.Black);
        // UltiDraw.End();
    }