0 votes

When I draw a path for a Path2D curve in the editor, I can create curves in the path using the control points of each point. I can extend the control a certain distance, and the line will curve in an intuitive fashion. When I create a Curve2D, however, things are different. I can add points to the curve via the add_point() function. One of the parameters for add_point() allows the programmer to specify the in and out control points. When I specify a control point near the point in question, however, the curve varies radically. The distance between the control point and the originating point could be small, yet the curve to that line segment is quite large. Could anyone shine some light on why this is?

asked Sep 9, 2018 in Engine by Ertain (1,257 points)
edited Sep 9, 2018 by Ertain

1 Answer

0 votes

The in and out control point variables in add_point() are relative to the first point. So in your case to put the control points near the original just do something such as add_point(Vector2(100, 100), Vector2(3, 4), Vector2(2, 1) INSTEAD OF add_point(Vector2(100, 100), Vector2(103, 104), Vector2(102, 101)

answered Jul 21, 2019 by swren02 (16 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.