using System.Collections; using System.Collections.Generic; using UnityEngine; public class Spin : MonoBehaviour { private float time = 0; public float speed; public void spinY(float add){ transform.rotation = Quaternion.Euler(0f,220f + add,0f); } void Start() { } // Update is called once per frame void Update() { time += Time.deltaTime + speed * Time.deltaTime; spinY(time); } }