13 lines
300 B
C#
13 lines
300 B
C#
using UnityEngine;
|
|
|
|
public class RotateAround : MonoBehaviour
|
|
{
|
|
public Vector3 axis = Vector3.up;
|
|
public float speed = 10f;
|
|
public Vector3 center = Vector3.zero;
|
|
void Update()
|
|
{
|
|
transform.RotateAround(transform.position + center, axis, speed * Time.deltaTime);
|
|
}
|
|
}
|