CollisionObjectResolver
Summary
Section titled “Summary”Collision Object Resolver
Internal utility for resolving collision objects and their test setups. Handles the logic for determining appropriate CollisionObject2D instances for layer checking and finding corresponding CollisionTestSetup2D objects.
This is an internal implementation detail of CollisionMapper and should not be used directly. Unit tests access it for testing the resolution logic.
Responsibilities:
- Resolve CollisionObject2D for layer checking from various collision node types - Find appropriate CollisionTestSetup2D for collision objects - Validate collision object hierarchies - Provide type-safe collision object handling
Supported Collision Types:
- CollisionObject2D (direct) - CollisionShape2D (via parent CollisionObject2D) - CollisionPolygon2D (via parent CollisionObject2D)
Methods
Section titled “Methods”func object_matches_layer_mask( collision_obj: CollisionObject2D, layer_mask: int ) -> boolCheck if a collision object matches the given layer mask
collision_obj: The CollisionObject2D to checklayer_mask: The layer mask to match against Returns: true if the object matches the layer mask
Source
Section titled “Source”addons/grid_building/placement/manager/components/mapper/collision_object_resolver.gd
This API reference is automatically generated from the plugin source code. For implementation examples and usage guides, see the guides section.