Unity3D总结记录(八) Unity中C#关于旋转

Unity3D中,旋转可采用如下两条语句:

earth.transform.Rotate(0,150*Time.deltaTime,0); //绕着自身某一个轴旋转

//绕着某个中心点的某一条轴旋转括号中参数意义(需要旋转的中心点Vector3,需要旋转的中心点的中心点轴,旋转速度)

earth.transform.RotateAround(earth.transform.position,Vector3.up,90*Time.deltaTime);


猜你喜欢

转载自blog.csdn.net/weixin_39591280/article/details/80812569