extends Node
func _quadratic_bezier(p0: Vector2, p1: Vector2, p2: Vector2, t: float): #Just Input the beginning, peak, and end of your arch into p0, p1, and p2 as Vector2s. Returns the movement between the three points. This should also work for Vector3s
var q0 = p0.lerp(p1, t)
var q1 = p1.lerp(p2, t)
var r = q0.lerp(q1, t)
return r
func _cubic_bezier(p0: Vector2, p1: Vector2, p2: Vector2, p3: Vector2, t: float):#If, for some reason, you'd like a bezier square instead you can just input your four points into p0, p1, p2, and p3. Returns the movement between those four points
var q0 = p0.lerp(p1, t)
var q1 = p1.lerp(p2, t)
var q2 = p2.lerp(p3, t)
var r0 = q0.lerp(q1, t)
var r1 = q1.lerp(q2, t)
var s = r0.lerp(r1, t)
return s