设置角速度及生成四元数及利用刚体

在对物体的rotation属性赋值的时候,每每是四元数,因此咱们须要把角度值转换成四元数 代码以下: //转换为四元数 Vector3 rotationVector3 = new Vector3(0f, 30f, 0f); Quaternion rotation = Quaternion.Euler(rotationVector3); myTransform.rotation = rotation
相关文章
相关标签/搜索