Unity3D中,旋转可采用如下两条语句:
earth.transform.Rotate(0,150*Time.deltaTime,0); //绕着自身某一个轴旋转
//绕着某个中心点的某一条轴旋转括号中参数意义(需要旋转的中心点Vector3,需要旋转的中心点的中心点轴,旋转速度)
earth.transform.RotateAround(earth.transform.position,Vector3.up,90*Time.deltaTime);
Unity3D中,旋转可采用如下两条语句:
earth.transform.Rotate(0,150*Time.deltaTime,0); //绕着自身某一个轴旋转
//绕着某个中心点的某一条轴旋转括号中参数意义(需要旋转的中心点Vector3,需要旋转的中心点的中心点轴,旋转速度)
earth.transform.RotateAround(earth.transform.position,Vector3.up,90*Time.deltaTime);