I’m making a 2D game and I want to simply draw a line between 2 points. I also want to be able to make the colour change along the line depending on a float between 0 and 1, representing progression along that line. I’ve accomplished this effect before outside of Unreal using C++ and OpenGL shaders by drawing a line primitive with 2 vertices, and I’ve included an image of that.
I see 3 functions in Blueprints called Draw Line. One for a Canvas, a HUD and a Paint Context Structure. Would one of these functions be best suited to doing this, or would it be better if I created some sort of custom solution? I’m not sure where I’d begin with doing it myself, but either way I’d need to be able to easily control the resolution/scale it so it’d always fit in with the other graphics.
There must be a quick and easy way to do this, surely?