From 208c24173a6feabc3aa783822a991e5aa73a2aca Mon Sep 17 00:00:00 2001 From: Mario Steele Date: Thu, 26 Feb 2026 19:09:53 -0600 Subject: [PATCH] Added Polygon debug drawing Added drawing the polygon points for the Mouse Passthrough. --- lib/debug_draw.gd | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/debug_draw.gd b/lib/debug_draw.gd index c7bbdea0..b1376ac0 100644 --- a/lib/debug_draw.gd +++ b/lib/debug_draw.gd @@ -2,6 +2,7 @@ extends Node2D class_name DebugDraw var points: PackedVector2Array +var polygon: PackedVector2Array func _draw() -> void: points = Globals.get_exception_points() @@ -13,8 +14,18 @@ func _draw() -> void: draw_line(slice[2], slice[3], Color.GREEN, 1.0, true) draw_line(slice[3], slice[0], Color.GREEN, 1.0, true) i += 4 + + polygon = Globals.get_polygon_points() + for j in polygon.size(): + if j+1 > polygon.size()-1: + draw_line(polygon[j], polygon[0], Color.RED, 1.0, true) + else: + draw_line(polygon[j], polygon[j+1], Color.RED, 1.0, true) func _process(_d: float) -> void: var current := Globals.get_exception_points() if current != points: queue_redraw() + current = Globals.get_polygon_points() + if current != polygon: + queue_redraw()