太阳地球月球公转自转脚本

太阳地球月球自转this

using System.Collections;
using System.Collections.Generic;
using UnityEngine;orm

public class rotate : MonoBehaviour {it

    // Use this for initialization
    void Start () {
        
    }
    
    // Update is called once per frame
    void Update () {
        transform.Rotate(0, 45 * Time.deltaTime, 0);
    }
}
 io

地球月球公转脚本form

using System.Collections;
using System.Collections.Generic;
using UnityEngine;class

public class Rotate1 : MonoBehaviour {
    public Transform thing;
    // Use this for initialization
    void Start () {
        
    }
    
    // Update is called once per frame
    void Update () {
        transform.RotateAround(thing.position, thing.up, 45 * Time.deltaTime);
    }
}
 transform

相关文章
相关标签/搜索