While working on the recent Ludum Dare, a few friends asked for a quick component to show a path to a target point. Instinctively I started working on converting 3d points to 2d lines.
It was a complicated translation, but it worked. It was clear that it wasn’t going to hold up with complicated paths with varying depth.
I started ‘fixing’ it to change it’s look based on the distance from the camera and then had a moment of clarity, why not just render the path in the 3d space? It’s a solution that I seem to come about more and more lately.
A lot better, now it can have natural depth, be effected by lighting and match post-processing effects in the game.