using UnityEngine;

public class CurveMidPoint : MonoBehaviour{
    const float MAXY = 20;
    public Transform startingPoint;
    public Transform endPoint;
    
    void Update(){
        Vector3 pos = new Vector3();
        pos.x = endPoint.position.x;
        pos.z = endPoint.position.z;
        pos.y = 1/Vector3.Distance(startingPoint.position, endPoint.position) * MAXY;

        transform.position = pos;
    }
}
