Path2D/Curve2D - Looking for a solution to properly close curve

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Suleymanov

Is there any way I can properly close the curve (Path2D)? The first point and the last point are on top of each other but not connected. How can I call the first and last points in the curve? My idea is to make “first_point.position = last_point.position” so that they at least stick together. Or if there are better ways, please let me know.

:bust_in_silhouette: Reply From: rakkarage

this says there is a close curve button :slight_smile:

Thank you for the kind reply. “Close Curve” button doesn’t PROPERLY close it though, it puts points on top of each other instead and they are disconnected, that’s the problem I mentioned above. My game is about in-game curve editing. When a player moves the first/last point, they get apart. Is there any solution to keep them connected?

Suleymanov | 2020-07-12 07:37