1 (edited by LazzLab 2024-12-11 15:19:56)

Topic: Assistance with Script for Line Drawing Along Marker Path

Hi Alex,

I hope everything is going well. I need some help to complete the attached script. Basically, I would like the line drawing to follow the map’s profile (with elevation) for each Marker I place during runtime along a path with multiple Markers.

Thank you so much!

Post's attachments

Attachment icon LineDrawingPath.txt 2.76 kb, 216 downloads since 2024-12-11 

Re: Assistance with Script for Line Drawing Along Marker Path

Hi.

I think in this case the Line Renderer way is wrong, because to follow the terrain you will need to constantly adjust the number of points based on the distance between markers to make it look more or less ok.

The best way here is to draw a line on the side of the shader.
This way the line will follow the terrain perfectly, look good, and work much faster than LineRenderer way.

The script and shader are attached.
Add the script to the map and specify the shader in Tileset / Materials & Shaders / Tileset Shader.

Post's attachments

Attachment icon TilesetWithLines.shader 1.78 kb, 199 downloads since 2024-12-12 

Attachment icon TilesetWithSegments.cs 1.74 kb, 236 downloads since 2024-12-12 

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.