Draw line between two points: In-game

Hi folks!

I can draw a line between two World points in BluePrints using the “Draw Debug Line” node.
Works great.

I can also draw a two-point spline between two World points using a Spline component and using “Add Spline World Point”.
Works great.

But, as soon as I want my line to be visible and live-updated in-game, I get nowhere.
This was real easy in Unity using the line renderer.

The Spline Mesh forces me to set points in Local space (WHY?) and I’ve found no good way to convert World locations to local locations in Unreal. Can’t believe I can’t do something so simple.

I’m basically trying to attach a rope from a World-Point to the top of my BluePrint Object. In-Game (not through the construction script but updated every Tick).

Anyone got any good tips? Been trying for 4 hours… and kind of embarrassed that I can’t figure this out.

1 Like

I found the answer here:

Thanks!

A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums
You can use this example in the way you want to use it. See part 2 as well.

A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums
You can use this example in the way you want to use it. See part 2 as well.

GetWorld()->LineBatcher->DrawLine(StartLocation, EndLocation, Color.ToFColor(false), SDPG_World, Thickness, LifeTime);

This can work in a packaged game

You sir are my hero. Thanks a lot!

link is dead