Change GameObject pivot point

Viewed 1616

Unity object not rotating in center. It was fine until an hour, I don't believe I changed the code or anything. I have also tried messing with the pivot/centre buttons on the top left but nothing is helping. The game Object is not rotating in the middle.

Rotator Code:

using UnityEngine;

public class Rotator : MonoBehaviour
{

    public float speed = 100f;

    // Update is called once per frame
    void Update()
    {
        transform.Rotate(0f, 0f, speed * Time.deltaTime);
    }
}
1 Answers
Related