Hello~
I’m trying to create a 2D Line with certain width: https://playground.babylonjs.com/#66VMB1#43
ultimately I want to change dynamically the width for each stroke of the line.
I tweaked some code from here since once I used the non-flat mesh, the code didn’t work.
but my code here doesn’t work either as I expected. I’m thinking angle
and direction
are the one I need to look at but I didin’t have any luck and am not really sure how to fix it to render the line even with the same width.
I tried another way here by 1) draw lines 2) clone and moved each line 3) tried to find the intersecting points of moved lines
but there were problems in this way as well
Problem#1 it looks like the lines are hardly intersecting even though it looks like
Problem#2 if I use more complicated points which doesn’t sit on the same plane(maybe), the calculation of centroid is totally off obviously and gives me a result like this
I tried all I can do but I’m totally stuck here
Would you mind sharing your insight for me?