collision_object_resolver
AUTO-GENERATED FILE — DO NOT EDIT MANUALLY
Source: systems/placement/processors/collision_object_resolver.gd
Version: 5.1
class_name: (none)
extends: RefCounted
Signals
(none)
Exports
(none)
Methods
_init()resolve_collision_object()- Resolve a collision object for layer checking and test setup lookup
@param collision_node: The collision node to resolve (CollisionObject2D, CollisionShape2D, or CollisionPolygon2D) @param test_setups: Array of available CollisionScenarioBuilder2D objects @return ResolutionResult containing the resolved collision object and test setup
_resolve_direct_collision_object()- Resolve direct CollisionObject2D
Processes a CollisionObject2D node to find its corresponding test setup or determine if it can be processed without one (e.g., when it contains CollisionPolygon2D children).
[b]Parameters:[/b] • [code]collision_obj[/code]: [i]CollisionObject2D[/i] - The collision object to resolve • [code]test_setups[/code]: [i]Array[CollisionScenarioBuilder2D][/i] - Available test setups to search through
[b]Returns:[/b] [i]ResolutionResult[/i] - Contains the collision object, found test setup (may be null), validity flag, and descriptive message
[b]Behavior:[/b] • First attempts to find a matching CollisionScenarioBuilder2D for the collision object • If no test setup found, checks if the object has CollisionPolygon2D children • CollisionPolygon2D children allow processing without test setups (polygon-based geometry) • Returns valid=true for polygon children, valid=false otherwise
_resolve_child_collision_object()- Resolve CollisionShape2D or CollisionPolygon2D via parent CollisionObject2D
_find_test_setup_for_collision_object()- Find test setup for a collision object
object_matches_layer_mask()- Check if a collision object matches the given layer mask
@param collision_obj: The CollisionObject2D to check @param layer_mask: The layer mask to match against @return true if the object matches the layer mask