using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;
public class zizhuan : MonoBehaviour {
public GameObject Axis; //轴,用于选择围绕中心
public float RotateSpeedGZ; //公转
public float RotateSpeedZZ; //自转
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
this.transform.RotateAround(Axis.transform.position, Vector3.up, RotateSpeedGZ);
transform.Rotate(Vector3.down * RotateSpeedZZ, Space.World);
}
}
网友评论