module Diorite::DebugDraw

Overview

High-level immediate-mode debug drawing API for Godot Engine 4.8+.

DebugDraw allows you to render primitives anywhere in game logic (e.g. _process, _physics_process, collision signals, AI controllers) without manually managing scene nodes.

Primitives are submitted to a centralized thread-safe queue and batch rendered by DebugDrawManager.

Features:

Defined in:

diorite/core/dsl.cr

Class Method Summary

Class Method Detail

def self.actor_card_3d(position : Godot::Vector3, title : String, stats : Hash(String, String) | Nil = nil, size : Godot::Vector2 = Godot::Vector2.new(1.2_f32, 0.8_f32), color : Godot::Color = Godot::Color.new(0.2_f32, 0.8_f32, 1.0_f32, 1.0_f32), duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws a 3D actor card billboard with ground anchor and stats readout.


[View source]
def self.apply_basis(basis : Godot::Basis) : Godot::Basis #

Transforms a 3D basis orientation by the active transform stack basis if present.


[View source]
def self.apply_dir(dir : Godot::Vector3) : Godot::Vector3 #

Transforms a 3D direction vector by the active transform stack basis if present.


[View source]
def self.apply_pos(pos : Godot::Vector3) : Godot::Vector3 #

Transforms a 3D position vector by the active transform stack if present.


[View source]
def self.arc_2d(center : Godot::Vector2, radius : Float32, start_angle : Float32, end_angle : Float32, segments : Int32 = 24, color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), duration : Float64 = 0.0, channel : String | Nil = nil) : Void #

Draws a 2D circular arc segment.


[View source]
def self.arrow_2d(from : Godot::Vector2, to : Godot::Vector2, color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), head_size : Float32 = 10.0_f32, duration : Float64 = 0.0, channel : String | Nil = nil) : Void #

Draws a 2D directional arrow with a triangular head on the canvas overlay.


[View source]
def self.arrow_3d(from : Godot::Vector3, to : Godot::Vector3, color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), head_size : Float32 = 0.25_f32, duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws a 3D directional arrow from from to to with a conical finned head.


[View source]
def self.bar_chart_2d(rect : Godot::Rect2, bars : Array(BarData), horizontal : Bool = false, title : String = "", duration : Float64 = 0.0, channel : String | Nil = nil) : Void #

Draws a 2D bar chart or histogram on the canvas.


[View source]
def self.bezier_cubic_3d(p0 : Godot::Vector3, p1 : Godot::Vector3, p2 : Godot::Vector3, p3 : Godot::Vector3, segments : Int32 = 32, color : Godot::Color = Godot::Color.new(1.0_f32, 0.8_f32, 0.0_f32, 1.0_f32), show_hull : Bool = true, duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws a 3D cubic Bézier spline curve with optional control hull.


[View source]
def self.billboard_square_3d(center : Godot::Vector3 = Godot::Vector3.new, size : Float32 = 1.0_f32, camera_pos : Godot::Vector3 = Godot::Vector3.new, color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil, position : Godot::Vector3 | Nil = nil) : Void #

Draws a billboard square wireframe centered at center.


[View source]
def self.box_3d(center : Godot::Vector3, size : Godot::Vector3, color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), wireframe : Bool = true, duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws an axis-aligned 3D bounding box (AABB) centered at center.


[View source]
def self.box_cast_3d(from : Godot::Vector3, to : Godot::Vector3, size : Godot::Vector3 = Godot::Vector3.new(1.0_f32, 1.0_f32, 1.0_f32), hit : Bool = false, color : Godot::Color = Godot::Color.new(0.0_f32, 0.9_f32, 1.0_f32, 0.8_f32), duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws a swept box cast between from and to.


[View source]
def self.camera_frustum_3d(origin : Godot::Vector3, basis : Godot::Basis, fov_deg : Float32 = 75.0_f32, near : Float32 = 0.05_f32, far : Float32 = 10.0_f32, aspect : Float32 = 1.777_f32, color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 0.0_f32, 1.0_f32), duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws a 3D camera viewing frustum wireframe.


[View source]
def self.capsule_2d(p0 : Godot::Vector2, p1 : Godot::Vector2, radius : Float32, color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), segments : Int32 = 12, duration : Float64 = 0.0, channel : String | Nil = nil) : Void #

Draws a 2D wireframe stadium capsule connecting two center points.


[View source]
def self.capsule_3d(center : Godot::Vector3, radius : Float32 = 0.5_f32, height : Float32 = 2.0_f32, color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), segments : Int32 = 16, duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws a 3D wireframe capsule with hemispherical top and bottom caps.


[View source]
def self.capsule_cast_3d(from : Godot::Vector3, to : Godot::Vector3, radius : Float32 = 0.5_f32, height : Float32 = 1.8_f32, hit : Bool = false, color : Godot::Color = Godot::Color.new(0.0_f32, 0.9_f32, 1.0_f32, 0.8_f32), duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws a swept capsule cast between from and to.


[View source]
def self.catmull_rom_3d(points : Array(Godot::Vector3), segments_per_curve : Int32 = 16, color : Godot::Color = Godot::Color.new(0.4_f32, 0.8_f32, 1.0_f32, 1.0_f32), loop : Bool = false, duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws a 3D Catmull-Rom spline curve passing smoothly through points.


[View source]
def self.channel(channel_name : String, &block : FrameContext -> ) : Void #

Yields FrameContext scoped to a specific channel.


[View source]
def self.channel_enabled?(name : String) : Bool #

Returns true if the channel is currently enabled.


[View source]
def self.circle_2d(center : Godot::Vector2, radius : Float32, color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), segments : Int32 = 24, duration : Float64 = 0.0, channel : String | Nil = nil) : Void #

Draws a 2D wireframe circle on the canvas overlay.


[View source]
def self.circle_3d(center : Godot::Vector3, normal : Godot::Vector3 = Godot::Vector3.new(0, 1, 0), radius : Float32 = 1.0_f32, segments : Int32 = 24, color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws an arbitrary 3D planar circle ring.


[View source]
def self.clear : Void #

Clears all active 2D and 3D commands from the global queue immediately.


[View source]
def self.cone_3d(tip : Godot::Vector3, dir : Godot::Vector3, length : Float32 = 5.0_f32, angle_rad : Float32 = 0.52359877_f32, segments : Int32 = 16, color : Godot::Color = Godot::Color.new(0.2_f32, 0.8_f32, 1.0_f32, 0.8_f32), duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws a 3D vision cone or spotlight frustum.


[View source]
def self.current_channel : String #

Current active drawing channel name.


[View source]
def self.current_transform : Godot::Transform3D | Nil #

Returns the active top transform on the stack, if any.


[View source]
def self.cylinder_3d(center : Godot::Vector3, radius : Float32 = 1.0_f32, height : Float32 = 2.0_f32, color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), segments : Int32 = 16, duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws a 3D wireframe cylinder with circular top/bottom caps.


[View source]
def self.disable_channel(name : String) : Void #

Disables a filtered channel, suppressing all associated commands.


[View source]
def self.enable_channel(name : String) : Void #

Enables a filtered channel.


[View source]
def self.enabled : Bool #

Master switch toggling all debug drawing on/off.


[View source]
def self.enabled=(val : Bool) #

Sets master drawing switch.


[View source]
def self.frame(&block : FrameContext -> ) : Void #

Yields a scoped FrameContext block for batching debug draws within a single frame.


[View source]
def self.freeze! : Void #

Pauses frame decay allowing static freecam inspection of active debug shapes.


[View source]
def self.frozen? : Bool #

Returns whether the debug queue is frozen.


[View source]
def self.gauge_2d(center : Godot::Vector2, radius : Float32, value : Float32, min_val : Float32 = 0.0_f32, max_val : Float32 = 100.0_f32, title : String = "", color : Godot::Color = Godot::Color.new(0.2_f32, 0.8_f32, 1.0_f32, 1.0_f32), duration : Float64 = 0.0, channel : String | Nil = nil) : Void #

Draws a 2D radial gauge on the canvas.


[View source]
def self.gauge_3d(center : Godot::Vector3, normal : Godot::Vector3, radius : Float32, value : Float32, min_val : Float32 = 0.0_f32, max_val : Float32 = 100.0_f32, title : String = "", color : Godot::Color = Godot::Color.new(0.2_f32, 0.8_f32, 1.0_f32, 1.0_f32), duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws a 3D radial gauge oriented along normal.


[View source]
def self.gizmo_3d(origin : Godot::Vector3, basis : Godot::Basis = Godot::Basis.new, size : Float32 = 1.0_f32, duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws a 3D coordinate transform gizmo with Red=X, Green=Y, Blue=Z axis vectors.


[View source]
def self.grid_3d(origin : Godot::Vector3 = Godot::Vector3.new, size : Godot::Vector2 = Godot::Vector2.new(10.0_f32, 10.0_f32), subdivisions : Int32 = 10, color : Godot::Color = Godot::Color.new(0.6_f32, 0.6_f32, 0.6_f32, 0.5_f32), duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil, center : Godot::Vector3 | Nil = nil) : Void #

Draws a 3D ground reference grid plane.


[View source]
def self.line_2d(from : Godot::Vector2, to : Godot::Vector2, color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), duration : Float64 = 0.0, channel : String | Nil = nil) : Void #

Draws a 2D line segment on the canvas overlay.


[View source]
def self.line_3d(from : Godot::Vector3, to : Godot::Vector3, color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws a 3D line segment between from and to.


[View source]
def self.line_arrow_3d(from : Godot::Vector3, to : Godot::Vector3, color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), head_size : Float32 = 0.25_f32, duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Alias for .arrow_3d. Draws a line with a terminal arrow head.


[View source]
def self.line_path_2d(points : Array(Godot::Vector2), color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), duration : Float64 = 0.0, channel : String | Nil = nil) : Void #

Alias for .path_2d.


[View source]
def self.line_path_3d(points : Array(Godot::Vector3), color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws a continuous 3D polyline connecting an ordered list of points.


[View source]
def self.obb_3d(center : Godot::Vector3, size : Godot::Vector3, basis : Godot::Basis, color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), wireframe : Bool = true, duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws an arbitrarily oriented bounding box (OBB) defined by a 3x3 rotation Basis.


[View source]
def self.path_2d(points : Array(Godot::Vector2), color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), duration : Float64 = 0.0, channel : String | Nil = nil) : Void #

Draws a continuous 2D polyline connecting an ordered list of points.


[View source]
def self.pie_chart_2d(center : Godot::Vector2, radius : Float32, slices : Array(PieSlice), inner_radius : Float32 = 0.0_f32, duration : Float64 = 0.0, channel : String | Nil = nil) : Void #

Draws a 2D pie or donut chart on the canvas.


[View source]
def self.pie_chart_3d(center : Godot::Vector3, normal : Godot::Vector3, radius : Float32, slices : Array(PieSlice), inner_radius : Float32 = 0.0_f32, duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws a 3D pie or donut chart oriented along normal.


[View source]
def self.plane_3d(center : Godot::Vector3, normal : Godot::Vector3 = Godot::Vector3.new(0.0_f32, 1.0_f32, 0.0_f32), size : Godot::Vector2 = Godot::Vector2.new(5.0_f32, 5.0_f32), color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws an oriented 3D plane quad with a center normal pointer.


[View source]
def self.points_2d(points : Array(Godot::Vector2), size : Float32 = 4.0_f32, color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), duration : Float64 = 0.0, channel : String | Nil = nil) : Void #

Draws discrete 2D point markers on the canvas overlay.


[View source]
def self.points_3d(points : Array(Godot::Vector3), size : Float32 = 0.1_f32, color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws small 3D crosshair markers for an array of world points.


[View source]
def self.pop_transform : Void #

Pops the current 3D coordinate transform from the stack.


[View source]
def self.position_3d(origin : Godot::Vector3, size : Float32 = 1.0_f32, color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws a 3-axis crossing crosshair indicating position and scale.


[View source]
def self.push_transform(xform : Godot::Transform3D) : Void #

Pushes a 3D coordinate transform onto the stack.


[View source]
def self.queue : DebugCommandQueue #

Returns the global underlying command queue.


[View source]
def self.ray_hit_3d(from : Godot::Vector3 = Godot::Vector3.new, hit_point : Godot::Vector3 = Godot::Vector3.new, normal : Godot::Vector3 = Godot::Vector3.new, color : Godot::Color = Godot::Color.new(0.0_f32, 1.0_f32, 0.0_f32, 1.0_f32), duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil, origin : Godot::Vector3 | Nil = nil) : Void #

Draws a raycast collision result showing cast ray and surface normal at the hit point.


[View source]
def self.rect_2d(rect : Godot::Rect2, color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), duration : Float64 = 0.0, channel : String | Nil = nil) : Void #

Draws a 2D wireframe rectangle on the canvas overlay.


[View source]
def self.reticle_3d(position : Godot::Vector3, normal : Godot::Vector3 = Godot::Vector3.new(0, 0, 1), size : Float32 = 0.5_f32, color : Godot::Color = Godot::Color.new(1.0_f32, 0.2_f32, 0.2_f32, 1.0_f32), duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws an aim reticle with a center circle and 4 corner target brackets.


[View source]
def self.ruler_2d(from : Godot::Vector2, to : Godot::Vector2, color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), tick_step : Float32 = 20.0_f32, tick_size : Float32 = 8.0_f32, duration : Float64 = 0.0, channel : String | Nil = nil) : Void #

Draws a 2D calibrated measuring ruler with distance tick marks.


[View source]
def self.ruler_3d(from : Godot::Vector3, to : Godot::Vector3, tick_size : Float32 = 0.2_f32, color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws a calibrated distance ruler with tick marks and midpoint distance readout.


[View source]
def self.sector_2d(center : Godot::Vector2, radius : Float32, start_angle : Float32, end_angle : Float32, segments : Int32 = 24, color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), duration : Float64 = 0.0, channel : String | Nil = nil) : Void #

Draws a 2D pie-slice sector.


[View source]
def self.sphere_3d(center : Godot::Vector3, radius : Float32 = 1.0_f32, color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), rings : Int32 = 16, duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws a 3D orthogonal ring wireframe sphere centered at center.


[View source]
def self.sphere_cast_3d(from : Godot::Vector3, to : Godot::Vector3, radius : Float32 = 0.5_f32, hit : Bool = false, color : Godot::Color = Godot::Color.new(0.0_f32, 0.9_f32, 1.0_f32, 0.8_f32), duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws a swept sphere cast visualizing collision trajectory between from and to.


[View source]
def self.spring_3d(from : Godot::Vector3, to : Godot::Vector3, radius : Float32 = 0.2_f32, coils : Int32 = 8, segments : Int32 = 16, color : Godot::Color = Godot::Color.new(1.0_f32, 0.9_f32, 0.1_f32, 1.0_f32), duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws a 3D helical wire spring between two world endpoints.


[View source]
def self.stat_graph_2d(title : String, value : Number, rect : Godot::Rect2 = Godot::Rect2.new(20.0_f32, 20.0_f32, 160.0_f32, 50.0_f32), min_val : Number = 0.0, max_val : Number = 100.0, color : Godot::Color = Godot::Color.new(0.2_f32, 0.9_f32, 0.3_f32, 1.0_f32)) : Void #

Updates and renders a real-time scrolling telemetry sparkline graph on the 2D canvas overlay.


[View source]
def self.surface_contact_3d(position : Godot::Vector3, normal : Godot::Vector3, radius : Float32 = 0.5_f32, segments : Int32 = 24, color : Godot::Color = Godot::Color.new(0.0_f32, 0.8_f32, 0.9_f32, 1.0_f32), duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Alias for .surface_disk_3d.


[View source]
def self.surface_disk_3d(position : Godot::Vector3, normal : Godot::Vector3, radius : Float32 = 0.5_f32, segments : Int32 = 24, color : Godot::Color = Godot::Color.new(0.0_f32, 0.8_f32, 0.9_f32, 1.0_f32), duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws a normal-aligned circular surface disc indicating a collision or ground contact patch.


[View source]
def self.telemetry_graph_2d(title : String, value : Number, rect : Godot::Rect2 = Godot::Rect2.new(20.0_f32, 20.0_f32, 160.0_f32, 50.0_f32), min_val : Number = 0.0, max_val : Number = 100.0, color : Godot::Color = Godot::Color.new(0.2_f32, 0.9_f32, 0.3_f32, 1.0_f32)) : Void #

Alias for .stat_graph_2d.


[View source]
def self.telemetry_series_2d(title : String, series_name : String, value : Number, color : Godot::Color = Godot::Color.new(0.2_f32, 0.9_f32, 0.3_f32, 1.0_f32), rect : Godot::Rect2 = Godot::Rect2.new(20.0_f32, 20.0_f32, 160.0_f32, 50.0_f32), min_val : Number = 0.0, max_val : Number = 100.0) : Void #

Updates a named series within a multi-series telemetry graph.


[View source]
def self.telemetry_threshold_2d(title : String, value : Number, color : Godot::Color = Godot::Color.new(1.0_f32, 0.3_f32, 0.3_f32, 0.8_f32), label : String = "") : Void #

Adds a horizontal threshold line across a telemetry graph.


[View source]
def self.text_2d(position : Godot::Vector2, text : String, color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), duration : Float64 = 0.0, channel : String | Nil = nil) : Void #

Draws a 2D text label on the canvas overlay.


[View source]
def self.text_3d(position : Godot::Vector3, text : String, color : Godot::Color = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32), duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws a 3D camera-facing billboard text label at world position position.


[View source]
def self.toggle_freeze! : Void #

Toggles freeze state.


[View source]
def self.trail_3d(id : String, current_position : Godot::Vector3, max_points : Int32 = 60, color : Godot::Color = Godot::Color.new(0.9_f32, 0.2_f32, 0.9_f32, 1.0_f32), on_top : Bool = true) : Void #

Appends a moving entity's current_position to an ongoing motion trail identified by id.


[View source]
def self.trajectory_arc_3d(origin : Godot::Vector3, velocity : Godot::Vector3, gravity : Godot::Vector3 = Godot::Vector3.new(0.0_f32, -9.8_f32, 0.0_f32), max_time : Float32 = 3.0_f32, steps : Int32 = 40, color : Godot::Color = Godot::Color.new(0.2_f32, 1.0_f32, 0.3_f32, 1.0_f32), duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws a ballistic projectile trajectory arc.


[View source]
def self.unfreeze! : Void #

Unfreezes frame decay resuming normal lifetime decay.


[View source]
def self.vision_cone_2d(origin : Godot::Vector2, dir : Godot::Vector2, distance : Float32, angle_rad : Float32, segments : Int32 = 16, color : Godot::Color = Godot::Color.new(0.0_f32, 0.9_f32, 1.0_f32, 0.8_f32), duration : Float64 = 0.0, channel : String | Nil = nil) : Void #

Draws a 2D vision cone or field-of-view wedge.


[View source]
def self.vision_cone_3d(origin : Godot::Vector3, direction : Godot::Vector3, angle_deg : Float32 = 45.0_f32, range : Float32 = 10.0_f32, color : Godot::Color = Godot::Color.new(0.0_f32, 0.9_f32, 1.0_f32, 0.8_f32), segments : Int32 = 24, duration : Float64 = 0.0, on_top : Bool = true, channel : String | Nil = nil) : Void #

Draws a spherical sector vision/detection cone for AI sensory perception.


[View source]
def self.with_channel(channel_name : String, &) : Void #

Sets the active channel for the duration of the given block.


[View source]
def self.with_transform(xform : Godot::Transform3D, &) : Void #

Executes a block with a local transform pushed to the stack.


[View source]