using UnityEngine; public class Circle2D : MonoBehaviour { public float speed = 1.5f; public float radius = 1.5f; public bool clockwise = true; Vector2 pos; Vector2 go; void Start() { pos = (Vector2)transform.position; } void FixedUpdate() { go.x = Mathf.Cos(Time.time * speed) * radius; go.y = Mathf.Sin(Time.time * speed) * radius; if (clockwise == true) { go.x = -go.x; } transform.position = new Vector3(pos.x + go.x, pos.y + go.y, 0f); } }