unity 使用RotateAround的使用注意
Posted jmarshall
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了unity 使用RotateAround的使用注意相关的知识,希望对你有一定的参考价值。
1.对于一个固定的点,围绕它进行旋转。需要注意区分世界坐标还是本地坐标
RotateAround(GameObject.Find("Cave").transform.position, transform.right, Time.deltaTime * 10);
RotateAround(GameObject.Find("Cave").transform.position, new Vector(0,0,1), Time.deltaTime * 10);
RotateAround(GameObject.Find("Cave").transform.position, GameObject.Find("Cave").transform.right, Time.deltaTime * 10);
上面是不一样的效果,假如围绕的点会进行移动的话,第一个世界坐标,第二个自身的朝向,第三个围绕的点的朝向。
以上是关于unity 使用RotateAround的使用注意的主要内容,如果未能解决你的问题,请参考以下文章