Skip to content

TargetingShapeCast2D

Encapsulates ShapeCast2D-based targeting logic as a reusable component

debug_log_collisions: bool = false

GB dependencies (typed)

Local debug flag: can be toggled per-instance in editor or by code

func resolve_gb_dependencies( p_container: GBCompositionContainer ) -> void

Resolve Grid Building dependencies (logger, targeting state)

func _physics_process( _delta: float ) -> void

Physics process: continuously update targeting state based on ShapeCast2D collisions

func update_target( ) -> void

Update the GridTargetingState.target based on current collisions Skips automatic updates when manipulation is active (target set manually)

func _log_collisions( ) -> void

Log current collisions for diagnostics

func _format_collision_layers( mask: int ) -> String

Format collision mask as layer names or numbers

addons/grid_building/systems/grid_targeting/grid_positioner/targeting_shape_cast_2d.gd


This API reference is automatically generated from the plugin source code. For implementation examples and usage guides, see the guides section.