Resolves where a 3D EDGE or TOP piece mounts under the cursor: sticky wall-line picking with a tremor band, explicit face slots, room-aware re-hosting, same-type run continuation, and replacement of the piece already on the aimed slot. The handler keeps only pick state (the held wall line and the held TOP socket). Input events, the rotate keys, the camera ray, the ghost and the commit stay with the caller: the caller sets wall_axis_lock from its rotate keys and passes the cursor's surface-plane point as the fallback when the positioner's physics pick does not belong to the cell. Usage: var handler := PlacementInputHandler3D.new() handler.configure(grid_map, object_service, positioner) var mount := handler.resolve_edge_mount(cell, plane_hit) # [cell, edge]
Source: addons/grid_placement/systems/building/3d/placement_input_handler_3d.gd
Syntax
class PlacementInputHandler3D extends RefCountedMembers
| Name | Kind | Summary |
|---|---|---|
AXIS_X | Field | Wall axes: X runs east/west edges, Z runs north/south edges. |
AXIS_Z | Field | |
NO_AXIS | Field | No axis latch: the cursor picks the nearest edge freely. |
DEFAULT_EDGE | Field | Edge used when the cursor gives no usable point (no camera, level ray). |
wall_axis_lock | Property | Axis the rotate keys latched, or NO_AXIS. |
configure | Method | |
reset | Method | |
reset_wall | Method | |
get_held_edge | Method | |
get_held_cell | Method | |
hold_wall | Method | |
axis_of_edge | Method | |
cells_near | Method | |
shared_hit_for | Method | |
resolve_edge_mount | Method | |
edge_under_cursor | Method | |
edge_pick_for_hit | Method | |
hysteresis_side | Method | |
stick_margin | Method | |
axis_side_edge | Method | |
face_mount_for_hit | Method | |
room_mount_for | Method | |
continues_same_type_run | Method | |
is_interior_column | Method | |
occupant_mount_for | Method | |
top_under_cursor | Method | |
top_pick_for_hit | Method | |
constrain_face_to_axis | Method | |
toggle_wall_axis | 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