Rule that validates placement based on collision detection. This rule checks for physics collisions at indicator positions and validates based on the [member pass_on_collision] setting: - [code]false[/code] (default): Placement FAILS if collision detected ("must have clear space") - [code]true[/code]: Placement FAILS if NO collision detected ("must overlap with existing objects")
Source: addons/grid_placement/placement/placement_rules/template_rules/collisions_check_rule.gd
Syntax
class CollisionsCheckRule extends TileCheckRuleMembers
| Name | Kind | Summary |
|---|---|---|
pass_on_collision | Property | Controls collision validation behavior: - [code]false[/code]: Rule PASSES when no collision (placement requires clear space) - [code]true[/code]: Rule PASSES when collision detected (placement requires overlap) Common use cases: - [code]false[/code]: Building placement (needs empty space) - [code]true[/code]: Attachment mechanics (must connect to existing structures) |
collision_mask | Property | Physics layers to scan for collisions. |
messages | Property | Modular message configuration resource |
setup | Method | |
issues | Property | |
validate_placement | Method | |
issue_message | Property | |
reason_message | Property | |
failing_indicators | Property | |
failing_count | Property | |
is_successful | Property | |
issues | Property | |
get_failing_indicators | Method | |
failed_indicators | Property | |
null_count | Property | |
valid_count | Property | |
collision_count | Property | |
excluded_bodies | Property | |
target_node | Property | |
indicator | Property | |
original_mask | Property | |
use_cache | Property | |
is_colliding | Property | |
has_real_collision | Property | |
colliders | Property | |
expected_collisions | Property | |
passed_count | Property | |
bodies | Property | |
target_node | Property | |
body_names | Property | |
get_editor_issues | Method | |
issues | Property | |
get_runtime_issues | Method | |
issues | Property |
Source
addons/grid_placement/placement/placement_rules/template_rules/collisions_check_rule.gd
Plugin docs root:gdscript/plugins/grid_placement_dev/docs