1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Fix add_line width being too wide

The line width of thick lines was being applied on both sides of the line, resulting in a line that was twice as thick as requested.

This PR fixes this embarrassing oversight.
This commit is contained in:
lawnjelly
2021-12-14 12:35:02 +00:00
parent db020eae29
commit cbb6dc35a1

View File

@@ -476,7 +476,7 @@ void VisualServerCanvas::canvas_item_add_line(RID p_item, const Point2 &p_from,
// 90 degrees
side = Vector2(-side.y, side.x);
side *= p_width;
side *= p_width * 0.5;
points.set(0, p_from + side);
points.set(1, p_from - side);