2D smooth occupancy registry. Authoritative spatial tracking for smooth/free placement mode. This is the primary validation layer; a physics overlap query is optional, enabled by a non-zero SmoothPlacementService.occupied_mask. Entry bookkeeping, snapshots and the projection rebuild live in SmoothOccupancyRegistry; this class owns the 2D geometry. Usage: var registry := SmoothOccupancyRegistry2D.new() if registry.can_occupy(position, footprint, rotation): registry.register(node, position, footprint, rotation)
Source: addons/grid_placement/services/smooth_occupancy_registry_2d.gd
Syntax
class SmoothOccupancyRegistry2D extends SmoothOccupancyRegistry.EntryMembers
| Name | Kind | Summary |
|---|---|---|
footprint | Property | 2D entry: world-space footprint, position, and rotation in radians. World-space axis-aligned footprint (size in world units). Set from ScenePlacementEntry.footprint_2d at commit time. |
position | Property | World position of the placed object. |
rotation | Property | Rotation in radians. |
get_world_rect | Method | |
copy_for | Method | |
to_record | Method | |
to_debug_record | Method | |
can_occupy | Method | |
register | Method | |
update | Method |
Guides that use this class
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