Closed dmurfet closed 2 years ago
You need to set the size of lines like they are done in CanvasState.UpdateLineFrame (account for thickness).
Rounding with cylinders on the end means you don't add the thickness to the line length because the cylinders add that extra half thickness on each end, rounding with uicorners means you do (the end of the line is at the perimeter of the rounded corner, not the radial centre).
If there's no rounding, you need to do the same thing as the uicorner method.
Are you saying that when drawing world lines using parts, lineInfo.Length * yStuds
is not the correct value in Size.X
for the part, or are you saying that if I wanted to add cylinders on the end then I would have to account for the length change as in CanvasState.UpdateLineFrame
?
The opposite. If you don't have cylinders on the ends, then you need to make the lines longer to add the extra half thickness that the cylinders would add. This is fixed now in v0.3.2
In the canvas lines have rounded ends (via UICorners) but in the world they don't, and this is visible at large line widths and with sharp corners. We can consider adding extra parts to the world (e.g. Cylinders) to fix the mismatch.