unity 小知识 [随时更新]


        //旋转矩阵
        var mat = Matrix4x4.Rotate(Quaternion.Euler(new Vector3(90, 90, 0)));
        Debug.Log(mat *Vector3.one+"\n"+mat);
        
        //缩放矩阵
        mat = Matrix4x4.Scale(new Vector3(5, 5, 5));
        Debug.Log(mat * new Vector3(7, 2, 2) + "\n" + mat);

        //平移矩阵
        mat = Matrix4x4.Translate(new Vector3(5, 5, 5));
        Debug.Log(mat.MultiplyPoint(new Vector3(2,2,2)) + "\n" + mat);


阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_17813937/article/details/79950008
文章标签: unity 知识点
个人分类: unity3d
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭