TargetingShapeCast2D
Summary
Section titled “Summary”Encapsulates ShapeCast2D-based targeting logic as a reusable component
Properties
Section titled “Properties”debug_log_collisions: bool = falseGB dependencies (typed)
Local debug flag: can be toggled per-instance in editor or by code
Methods
Section titled “Methods”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
Source
Section titled “Source”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.