Decides whether a pointer press lands on UI and must not become a world click. Production positioners raycast in _input, which runs before the GUI consumes the event; without this check a catalog click whose ray hits a cell would emit a world click (spurious placement plus action-log failure lines). The live answer comes from the viewport hover state. Games whose UI never drives viewport hover inject a custom policy, and headless tests (hover needs a display) inject a stub.
Source: addons/grid_placement/systems/grid_targeting/positioner_ui_policy.gd
Syntax
class PositionerUIPolicy extends RefCountedMembers
| Name | Kind | Summary |
|---|---|---|
is_over_ui | Method |
Tutorials built on Grid Placement
- Godot multiplayer grid placement: one host, four sessions
- Godot 2D grid building system: paint, place, save
- Godot 3D grid building system: the runtime loop
- Godot 4 grid-building plugins: build mode vs editor tools
- 3D room placement in Godot: build rooms and stack storeys
- 3D grid placement in Godot 4: full setup tutorial
- Snap to a TileMap in Godot: 2D grid placement
- How to make a farming system in Godot
- How to snap objects to a 3D grid in Godot