목록2023/07/31 (1)
아카이브
7/31 유니티 복습
스크립트 using System.Collections; using System.Collections.Generic; using UnityEngine; public class RouletteControler : MonoBehaviour { float rotSpeed = 0; //회전속도 void Start() { } // Update is called once per frame void Update() { //왼쪽버튼 눌렀다면 if(Input.GetMouseButtonDown(0)) { this.rotSpeed = 10; } //회전 속도 만큼 룰렛을 회전시킨다. transform.Rotate(0, 0, this.rotSpeed); } } 결과 회전속도 줄이기 rotSpeed 값에 감쇠계수 0.96을 곱하..
유니티 기초
2023. 7. 31. 23:33