Draw 3d lines over landscape

Hello everyone,

I’m working on a grid-based game and I’m trying to dynamically render 3D lines over a landscape that will indicate the range of movement, something similar to the attached screenshot. Notice how the lines are curved so that they are exactly over the terrain, even if there are bumps.

I’ve tried dynamically spawning static mesh instances but this doesn’t seem very elegant (Need to create a texture with a white line for every direction).

What would be the best way to achieve something like that?

Thank you

possible solution would be to draw grid into render target and project it onto world. currently i’m drawing box to 16 by 16 render target, would like to find a better solution.

Isn’t that a really good way of doing it though?

It has issues with default render target filtering. i found unfiltered texture group, but that won’t allow to easily get outline.

You can inherit from FPrimitiveSceneProxy, override the ‘GetDynamicMeshElements’ method, using Collector.GetPDI() to get a FPrimitiveDrawInterface, then using its DrawLine method.

Here is an example.

You can also check my Grid plugin, the LineComponent and GridOutlineComponent maybe helpful.