행성1 Unity 행성 공전&자전 구현하기 2편 (물체기준 회전) Unity에서 행성 자전 구현하기 이번에는 자전을 구현해보겠습니다. 자전은 공전과 비슷하게 회전하는 함수를 쓰면됩니다. [C#] 엔셀라두스 자전 Script12345678910111213141516using UnityEngine; public class Rotation: MonoBehaviour{ public float speed = 10.0f; //회전속도 private void Update() { Orbit_Rotation(); } void Orbit_Rotation() { transform.Rotate(Vector3.down * speed * Time.deltaTime); //transform.Rotate(Vector3 EularAngle) }}Colored by Color Scriptercs 자전.. 2017. 9. 18. 이전 1 다음