using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class TestOrbit : MonoBehaviour
{
    public float Radius = 10f;
    public float Speed = 1f;
    private Vector3 _rot;

    private Vector3 _initPos;
    // Start is called before the first frame update
    void Start()
    {
        _initPos = transform.position;
        _rot = new Vector3(0,0,0);
    }

    // Update is called once per frame
    void Update()
    {
        _rot.x = Mathf.Sin(Time.time * Speed);
        _rot.y =  Mathf.Cos(Time.time * Speed);
        transform.position = _initPos + Radius * _rot;
    }
}
