[HELP] Drawing a line between 2 objects in the editor

I’m creating an AI Node Blueprint called a Search Point which can be connected to 1 or more other Search Points in the editor. These external search points are stored in an array.

However, I would like to draw lines between connected Search Points in the editor, ideally with arrows on them indicating the direction of the connection.

I’m guessing that in the construction script I need a ‘For Loop’ that goes through the Search Point array and use the Draw Line node to coonect them, howevet the Draw Line note wants 2D location data, not object data (see enclosed pic).

Does anyone know the best way of handling this and if it’s easy to add direction arrows to them?

Also, is there a way to only draw lines for Search Points that are onscreen in the editor, to stop this check from killing framerate?

Thanks :slight_smile:

there is that cable component, maybe you can use.
DrawLine is for HUD, so it’s natural it only accept 2d location.

It doesn’t look like the Cable Component is related.

I was assuming, you want to show lines draw between 2 object while still being in editor mode right?
So trace and draw whatever call is out of question as I don’t think they run in editor mode.
You’d need a 3D object like arrow, or something similar that you can add to your root component to show it in editor.
Or, you can see what they did for navigation widget that draw line between 2 points.

Yup, but the problem with traces at the moment is they’re quite intensive because they’re checking for alot of actors, rather than just the two I want. This will only get worse as levels get filled with hundreds of these points.

why not just use the arrow component? you can orient it, scale it in say x-axis. construction are totally fine with tweaking component as well.

Ah, sorry, I get you now. Well I’ve give it a shot. But it does sound like, from reading a few posts, that people would like the abiity to draw custom debug lines in the editor and hopefully something Epic will look into adding.

if it’s already on answer hub, feel free to add comment and request for that feature as well.
as far as I’ve read so far, this is kinda first to try draw line in editor but not in PIE or standalone mode.