绕p点,y轴,旋转60度。
IEnumerator IRota()
{
yield return null;
int timer = 60;
while (timer > 0)
{
yield return null;
transform.RotateAround(p, new Vector3(0, -1, 0), 1.0f);//绕着某个点,绕着哪个轴,每帧转多少度
timer -= 1;
}
yield return null;
}
网友评论