
csharp
닫기using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RouletteController : MonoBehaviour
{
public float rotAngle = 0;
public float dampingCoeffient = 3.6f;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
//만약 왼손을 눌렀다면
if (Input.GetMouseButtonDown(0))
{
Debug.Log("왼쪽 버튼 클릭");
this.rotAngle = 10;
}
this.transform.Rotate(0, 0, rotAngle);
//감쇠 계수를 곱해서 angle을 줄여라
//rotAngle *= dampingCoeffient;
Debug.Log(this.rotAngle);
}
}
'유니티 기초 > 복습' 카테고리의 다른 글
챕터6 ClimbCloud [미완] - 복습 (0) | 2023.08.04 |
---|---|
챕터 5 고양이 탈출 복습 - [완] (0) | 2023.08.04 |
챕터5 고양이탈출 - CatEscape - 복습 (0) | 2023.08.02 |
[수업과제] 표창 던지기 - 복습 (0) | 2023.08.02 |
자동차 스와이프 Swipe Car - 복습 (0) | 2023.08.02 |