This repository has been archived on 2025-04-28. You can view files and clone it, but cannot push or open issues or pull requests.
ARPlusSystem/ARPlusSystem-250418/Assets/ARLocation/Scripts/Utils/RotateObject.cs

20 lines
424 B
C#
Raw Normal View History

using UnityEngine;
namespace ARLocation.Utils
{
public class RotateObject : MonoBehaviour
{
public float Speed = 10.0f;
public Vector3 Axis = Vector3.up;
private float angle;
// Update is called once per frame
void Update()
{
angle += Speed * Time.deltaTime;
transform.localRotation = Quaternion.AngleAxis(angle, Axis);
}
}
}