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);  

上面是不一样的效果,假如围绕的点会进行移动的话,第一个世界坐标,第二个自身的朝向,第三个围绕的点的朝向。

转载于:https://www.cnblogs.com/JMarshall/p/10749595.html

你可能感兴趣的:(unity 使用RotateAround的使用注意)