13 lines
340 B
C#
13 lines
340 B
C#
|
|
using UnityEngine;
|
||
|
|
|
||
|
|
public class WindmillBladeRotator : MonoBehaviour
|
||
|
|
{
|
||
|
|
[Header("Rotation Settings")]
|
||
|
|
public float rotationSpeed = 60f; // degrees per second
|
||
|
|
public Vector3 rotationAxis = Vector3.forward; // default: Z axis
|
||
|
|
|
||
|
|
void Update()
|
||
|
|
{
|
||
|
|
transform.Rotate(rotationAxis, rotationSpeed * Time.deltaTime);
|
||
|
|
}
|
||
|
|
}
|