You've already forked godot
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:
@@ -476,7 +476,7 @@ void VisualServerCanvas::canvas_item_add_line(RID p_item, const Point2 &p_from,
|
|||||||
|
|
||||||
// 90 degrees
|
// 90 degrees
|
||||||
side = Vector2(-side.y, side.x);
|
side = Vector2(-side.y, side.x);
|
||||||
side *= p_width;
|
side *= p_width * 0.5;
|
||||||
|
|
||||||
points.set(0, p_from + side);
|
points.set(0, p_from + side);
|
||||||
points.set(1, p_from - side);
|
points.set(1, p_from - side);
|
||||||
|
|||||||
Reference in New Issue
Block a user