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

[RequireComponent(typeof(Rigidbody))]
public class OrbitController : MonoBehaviour
{
    public GameObject OrbitTarget;
    public float Force = 1.0f;
    private Rigidbody _rigidBody;

    // Start is called before the first frame update
    void Start()
    {
        _rigidBody = GetComponent<Rigidbody>();
    }

    // Update is called once per frame
    void FixedUpdate()
    {
        _rigidBody.AddForce(_rigidBody.transform.forward * Force * Time.deltaTime);
        Debug.DrawLine(_rigidBody.transform.position, _rigidBody.transform.position + _rigidBody.transform.forward, Color.red);
    }
}
