15 lines
291 B
C#
15 lines
291 B
C#
|
|
using System.Collections;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using UnityEngine;
|
|||
|
|
|
|||
|
|
public class Rotate : MonoBehaviour
|
|||
|
|
{
|
|||
|
|
public Vector3 Axis;
|
|||
|
|
|
|||
|
|
public float Speed;
|
|||
|
|
|
|||
|
|
void Update()
|
|||
|
|
{
|
|||
|
|
transform.localRotation *= Quaternion.AngleAxis(Speed * Time.deltaTime, Axis);
|
|||
|
|
}
|
|||
|
|
}
|