How to draw a line?

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

I am trying to draw a line between two objects. And there is a box between these two objects.
I want the line to avoid entering the box, for example, the program will add one point at the corner of the box to make that happen.
or, can you tell me how to get all objects’ shapes and positions?

:bust_in_silhouette: Reply From: Calinou

You can use the Line2D node or custom drawing in 2D in the _draw() function to achieve this.

Is there a way to get the shapes of all objects in the scene?

dethland | 2020-12-22 17:01