4.2.1
Path 2D direction
Hi everyone ! I’m currently implementing some pathes in my 2d game. And I have a question : is it possible to reverse the direction of a path2D in godot (that is indicated by the arrows) ?
Hi everyone ! I’m currently implementing some pathes in my 2d game. And I have a question : is it possible to reverse the direction of a path2D in godot (that is indicated by the arrows) ?
func reverse_curve2d_points():
var new_curve=Curve2D.new()
for i in range(curve.point_count-1,-1,-1):
new_curve.add_point(curve.get_point_position(i))
curve=new_curve
the curve
is path2d’s curve
I’m gonna try this .
Thank you !