World, View and Projection Transformation Matrices

Since Matrix4x4.Rotate does not exist in Unity5.6, you might need to make a rotation matrix from Matrix4x4. I found this article quite helpful.
この記事World, View and Projection Transformation Matricesが非常に参考になった。)

        Matrix4x4 rotmat = Matrix4x4.identity;

        rotmat.m00 = Mathf.Cos((yRotationDegree * Mathf.PI) / 180);
        rotmat.m02 = Mathf.Sin((yRotationDegree * Mathf.PI) / 180 * -1.0f);
        rotmat.m20 = Mathf.Sin((yRotationDegree * Mathf.PI) / 180);
        rotmat.m22 = Mathf.Cos((yRotationDegree * Mathf.PI) / 180);

You could multiply other matrices and rotmat.


Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account log in.