Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Unity] 绘制带旋转的 WireCube #24

Open
yangruihan opened this issue Dec 8, 2020 · 0 comments
Open

[Unity] 绘制带旋转的 WireCube #24

yangruihan opened this issue Dec 8, 2020 · 0 comments

Comments

@yangruihan
Copy link
Owner

public static void DrawWireCube(Vector3 pos, Quaternion rot, Vector3 size, Color color = default)
{
    if (color != default)
        Handles.color = color;

    var angleMatrix = Matrix4x4.TRS(pos, rot, Vector3.one);
    var matrix = Gizmos.matrix;

    Gizmos.matrix = angleMatrix;
    Gizmos.DrawWireCube(Vector3.zero, size);

    Gizmos.matrix = matrix;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant