14 lines
328 B
C#
14 lines
328 B
C#
using UnityEngine;
|
|
|
|
public class Fish_Rotation : MonoBehaviour
|
|
|
|
{ // 회전 속도 변수, 유니티 에디터에서 조정 가능
|
|
public float rotationSpeed = 10f;
|
|
|
|
void Update()
|
|
{
|
|
// 오브젝트를 y축을 기준으로 회전
|
|
transform.Rotate(Vector3.up * rotationSpeed * Time.deltaTime);
|
|
}
|
|
}
|