Draft — Unreleased:This page is in active development. APIs, class names, and behavior may change before the release is finalized. Use it as a preview of what's coming — not as a stable integration target.
Responsibilities:
- Translate CollisionShape2D / CollisionPolygon2D geometry into tile offsets used by placement rules and indicators.
- Apply filtering, normalization, and heuristics to remove slivers and normalize pivots for consistent indicators.
- Provide caching and utility helpers consumed by IndicatorManager and the placement pipeline. See: Collision Mapping guide
Source: addons/grid_placement/placement/manager/components/mapper/collision_mapper_2d.gd
Syntax
class CollisionMapper2D extends PlacementInjectableMembers
| Name | Kind | Summary |
|---|---|---|
MIN_POLY_TILE_OVERLAP_RATIO | Field | |
indicator_contact_positions | Property | |
test_indicator | Property | |
test_setups | Property | Maps each CollisionObject2D to its CollisionTestSetup2D for collision testing. |
get_targeting_state | Method | |
create_with_injection | Method | |
targeting_state | Property | |
logger | Property | |
mapper | Property | |
issues | Property | |
get_runtime_issues | Method | |
issues | Property | |
resolve_placement_dependencies | Method | |
setup | Method | |
map_collision_positions_to_rules | Method | |
map | Property | |
dbg_msg | Property | |
co | Property | |
default_mask | Property | |
positions_only | Property | |
pos_tile | Property | |
abs_tile | Property | |
rule_info | Property | |
found_positions | Property | |
found_count | Property | |
pos_tile | Property | |
abs_tile | Property | |
get_collision_tile_positions_with_mask | Method | |
colliding_tile_positions | Property | |
diag_lines | Property | |
col_obj | Property | |
resolution | Property | |
matches | Property | |
obj_layer | Property | |
mask_layers | Property | |
obj_layers | Property | |
collision_tile_offsets | Property | |
offsets_count | Property | |
shown | Property | |
i | Property | |
msg | Property | |
combined_results | Property | |
has_polygon | Property | |
child_offsets | Property | |
tile_set | Property | |
auto_setup | Property | |
result | Property | |
get_tile_offsets_for_collision_polygon | Method | |
collision_tile_offsets | Property | |
result | Property | |
get_tile_offsets_for_test_collisions | Method | |
collision_positions | Property | |
validation_issues | Property | |
col_obj | Property | |
map | Property | |
get_rect_tile_positions | Method | |
does_indicator_overlap_shape | Method |
Source
addons/grid_placement/placement/manager/components/mapper/collision_mapper_2d.gd
Plugin docs root:gdscript/plugins/grid_placement_dev/docs