OldBlueWater/BlueWater/Assets/NWH/Common/Scripts/Demo/DemoRotator.cs
2023-12-19 11:31:29 +09:00

26 lines
486 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace NWH.Common.Demo
{
public class DemoRotator : MonoBehaviour
{
public Vector3 rotation;
private Rigidbody _rb;
private void Start()
{
_rb = GetComponent<Rigidbody>();
}
private void FixedUpdate()
{
_rb.MoveRotation(transform.rotation * Quaternion.Euler(rotation * Time.fixedDeltaTime));
}
}
}