其他分享
首页 > 其他分享> > 向量旋转

向量旋转

作者:互联网

    float angle = Quaternion.LookRotation(vector, Vector3.up).eulerAngles;

    vector.x = vector.x * Mathf.Cos(Mathf.Deg2Rad * angle);

    Vector3 vector = Quaternion.AngleAxis(angle, Vector3.up) * Vector3.forward;

标签:angle,up,Vector3,Mathf,旋转,Quaternion,vector,向量
来源: https://www.cnblogs.com/Joke-crazy/p/10388202.html