line2D function width enlargement problem in one direction

Hello, I am creating a line with the line2D function in the babylonjs documentation. The method creates the line, but creates the size of the line unilaterally. It only magnifies to one side. I couldn’t find any solution. How can I make the line grow in both + and - directions?


2D Line in XZ plane with Width | Babylon.js Playground (babylonjs.com)

Hi @farukcelim
I’m not sure to understand. Width is on both sides. in this PG, I’ve added a thinner red line on top and it’s in the middle:

2 Likes

I am sorry this is my mistake. The line2d function behaves this way in my local but as you said it should be here. Thanks for your answer. I flagged the admins to delete the post.