Esempio n. 1
0
    protected virtual void OnDrawGizmosSelected()
    {
        Gizmos.matrix = transform.localToWorldMatrix;

        SgtHelper.DrawCircle(Vector3.zero, Vector3.up, RadiusMin);
        SgtHelper.DrawCircle(Vector3.zero, Vector3.up, RadiusMax);
    }
Esempio n. 2
0
    protected virtual void OnDrawGizmosSelected()
    {
        if (SgtHelper.Enabled(this) == true)
        {
            Gizmos.matrix = transform.localToWorldMatrix;

            SgtHelper.DrawCircle(Vector3.zero, Vector3.right * InnerRadius, Vector3.forward * InnerRadius);
            SgtHelper.DrawCircle(Vector3.zero, Vector3.right * OuterRadius, Vector3.forward * OuterRadius);

            if (CalculateShadow() == true)
            {
                Gizmos.matrix = Matrix.inverse;

                Gizmos.DrawWireCube(new Vector3(0, 0, 5), new Vector3(2, 2, 10));
            }
        }
    }
Esempio n. 3
0
    protected virtual void OnDrawGizmosSelected()
    {
        if (SgtHelper.Enabled(this) == true)
        {
            if (transform.parent != null)
            {
                Gizmos.matrix = transform.parent.localToWorldMatrix;
            }

            var r1 = Radius;
            var r2 = Radius * (1.0f - Oblateness);

            SgtHelper.DrawCircle(Center, Vector3.right * r1, Vector3.forward * r2);

            Gizmos.DrawLine(Vector3.zero, transform.localPosition);
        }
    }