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

public class SphericalProjectileScript : MonoBehaviour
{
    public float speed=1.0f;
    public Vector3 dir;
    public float starting_height;
    public float damage = 1.0f;

    public float duration = 0.0f;

    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        duration += Time.deltaTime;
        
        Vector3 pos = transform.position + dir * speed;

        pos = Vector3.Normalize(pos)*starting_height;

        dir = Vector3.Normalize(pos -transform.position);

        transform.position = pos;

    }
}
