UnityEngine.Quaternion

作者:追风剑情 发布于:2023-10-13 12:30 分类:Unity3d

示例:变换旋转空间

//世界空间转摄像机空间
Quaternion rotationCameraSpace = Quaternion.Inverse(CameraCache.Main.transform.rotation) * transform.Rotation;
//保持与摄像机相对旋转角不变
transform.Rotation = CameraCache.Main.transform.rotation * rotationCameraSpace;  

标签: Unity3d

Powered by emlog  蜀ICP备18021003号-1   sitemap

川公网安备 51019002001593号