本文共 488 字,大约阅读时间需要 1 分钟。
这些是我从别的博客上看到的,觉得很有用,就转到我自己的博客中来了,方便以后自己看,在文章最后,就是原博客地址。
1:已知3D坐标和一个旋转角度,及一段距离,求目标点的3D坐标
已知当前点为target,目标点沿着target的Y轴旋转30度,沿着target的X轴延伸10米,求目标点新的3D坐标
using UnityEngine;using System.Collections; public class Test:MonoBehaviour{ //目标 public Transform target; void LateUpdate(){ Quaternion rotation=Quaternion.Euler(0f,30f,0f)*target.rotation; Vector3 newPos=rotation*new Vector3(10f,0f,0f); } }
http://www.cnblogs.com/He-Jing/p/3783061.html