Exemplo n.º 1
0
        public static void DrawRectangle(RectangleRequest r)
        {
            Vector2 vector = r.preRotationOffset.RotatedBy(r.rotation.AsAngle);

            r.center += new Vector3(vector.x, 0f, vector.y);

            Vector3   s      = new Vector3(r.size.x, 1f, r.size.y);
            Matrix4x4 matrix = default(Matrix4x4);
            Vector3   pos    = r.center + Vector3.up * 0.01f;

            matrix.SetTRS(pos, r.rotation.AsQuat, s);
            Graphics.DrawMesh(MeshPool.plane10, matrix, r.mat, 0);
        }
Exemplo n.º 2
0
        public static void DrawRectangle(RectangleRequest r)
        {
            Vector2 vector = r.preRotationOffset.RotatedBy(r.rotation.AsAngle);
            r.center += new Vector3(vector.x, 0f, vector.y);

            Vector3 s = new Vector3(r.size.x, 1f, r.size.y);
            Matrix4x4 matrix = default(Matrix4x4);
            Vector3 pos = r.center + Vector3.up * 0.01f;

            matrix.SetTRS(pos, r.rotation.AsQuat, s);
            Graphics.DrawMesh(MeshPool.plane10, matrix, r.mat, 0);

        }