CollisionObjectResolver
AUTO-GENERATED FILE – DO NOT EDIT MANUALLY
Collision Object Resolver
Source File: addons/grid_building/placement/manager/components/mapper/collision_object_resolver.gd
Extends: RefCounted
Public Methods
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 CollisionTestSetup2D objects @return ResolutionResult containing the resolved collision object and test setup
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
Private Methods
_resolve_direct_collision_object
Flags: private
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).
Parameters:
• collision_obj: CollisionObject2D - The collision object to resolve
• test_setups: Array[CollisionTestSetup2D] - Available test setups to search through
Returns: ResolutionResult - Contains the collision object, found test setup (may be null), validity flag, and descriptive message
Behavior: • First attempts to find a matching CollisionTestSetup2D 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
Flags: private
Resolve CollisionShape2D or CollisionPolygon2D via parent CollisionObject2D
_find_test_setup_for_collision_object
Flags: private
Find test setup for a collision object