Skip to content

debug

FreeBodyEngine.graphics.debug #

Visual debuging nodes.

CircleColliderDebug() #

Bases: Debug2D

Debug overlay drawn as a circle, added as a child by CircleCollider2D.toggle_debug_visuals() to visualize a CircleCollider2D's extent.

Builds the debug circle mesh (radius 0.5, i.e. unit diameter, so the node's own scale maps directly onto the collider's radius) and loads the shared engine://debug/debug.fbmat debug material.

Debug2D(draw_type='mesh', mesh=None, material=None, line_start=None, line_end=None, line_width=None) #

Bases: Node2D

Base node for 2D debug-visualization overlays - wraps a mesh and material so a debug shape can be drawn without going through a full Sprite (e.g. for collider outlines).

Stores the given mesh and material for later drawing.

draw_type = draw_type instance-attribute #

line_end = line_end instance-attribute #

line_start = line_start instance-attribute #

line_width = line_width instance-attribute #

material = material instance-attribute #

mesh = mesh instance-attribute #

PolygonColliderDebug(local_vertices) #

Bases: Debug2D

Debug overlay drawn as a filled polygon, added as a child by PolygonCollider2D.toggle_debug_visuals() to visualize a PolygonCollider2D's extent.

Builds the debug polygon mesh from the same local_vertices the PolygonCollisionShape itself uses, and loads the shared engine://debug/debug.fbmat debug material.

RectangleColliderDebug() #

Bases: Debug2D

Debug overlay drawn as a quad, added as a child by RectangleCollider2D.toggle_debug_visuals() to visualize a RectangleCollider2D's extent.

Builds the debug quad mesh and loads the shared engine://debug/debug.fbmat debug material.