太陽地球月球公轉自轉腳本

太陽地球月球自轉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

相關文章
相關標籤/搜索