You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
424 B
19 lines
424 B
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);
|
|
}
|
|
}
|
|
}
|