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?
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.
You can inherit from FPrimitiveSceneProxy, override the ‘GetDynamicMeshElements’ method, using Collector.GetPDI() to get a FPrimitiveDrawInterface, then using its DrawLine method.