Essentially I got this function
func project_point_on_line(P : Vector3, A : Vector3, B : Vector3) -> Vector3:
var line_direction = B - A
var line_length = line_direction.length()
line_direction = line_direction.normalized()
var change = P-A
var project_length : float = clampf(
change.dot(line_direction), 0, line_length)
return A + line_direction*project_length
But it returns the closest point on a line, I need a function that looks something more like this
func project_point_on_line(P : Vector3, A : Vector3, B : Vector3, Project_Dir : Vector3) -> Vector3:
# returns the point on the line
So it'd return a point on the line thats in that general direction.
Help on this issue would be very appriciated!