先上一张效果图
using UnityEngine;
using System.Collections;
public class TestRotateRound : MonoBehaviour
{
public GameObject Sphere;
private float curtTime = 0.0f;
void Update()
{
//使用C#封装好的代码RotateAround
gameObject.transform.RotateAround(Sphere.transform.position, Sphere.transform.up, 72 * Time.deltaTime);
//自己封装代码,功能和上面的相同
//RotateAround(Sph