Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- public class RotateSphere : MonoBehaviour
- {
- public float rotationSpeed = 20f; // 20 degrees per second
- void Update()
- {
- // Rotate the sphere by the specified speed around its up (Y) axis
- transform.Rotate(Vector3.up * rotationSpeed * Time.deltaTime);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement