유니티 C# 공전, 자전 간단 구현 Revolution


유니티 C# 공전, 자전 간단 구현 Revolution

공전 public class MoonRevolution : MonoBehaviour { public Transform target; [Range(0, 100)] public float rotateSpeed = 10f; private void Update() { transform.RotateAround(target.transform.position, new Vector3(0, 1, 0), rotateSpeed * Time.deltaTime); } } 자전 public class EarthRotation : MonoBehaviour { [Range(0, 100)] public float speed = 25f; private void Update() { transform.Rotate(new Vector3(0,..


원문링크 : 유니티 C# 공전, 자전 간단 구현 Revolution