22 lines
405 B
C#
22 lines
405 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
|
|
public class RotationAnimation : MonoBehaviour
|
|
{
|
|
public Vector3 axis = Vector3.right;
|
|
public float angle;
|
|
|
|
// Use this for initialization
|
|
void Start () {
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update ()
|
|
{
|
|
transform.localRotation = Quaternion.AngleAxis(angle*Time.deltaTime, axis.normalized)* transform.localRotation;
|
|
|
|
|
|
}
|
|
}
|