24 lines
361 B
C#
24 lines
361 B
C#
using UnityEngine;
|
|||
|
|
using System.Collections;
|
||
|
|
|
||
|
|
public class ConstantAngularSpeed : MonoBehaviour
|
||
|
|
{
|
||
|
|
|
||
|
|
public Vector3 angularVelocity;
|
||
|
|
|
||
|
|
// Use this for initialization
|
||
|
|
void Start () {
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
// Update is called once per frame
|
||
|
|
void Update () {
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
void FixedUpdate()
|
||
|
|
{
|
||
|
|
GetComponent<Rigidbody>().angularVelocity = angularVelocity;
|
||
|
|
}
|
||
|
|
}
|