Makes a placed object movable, rotatable, flippable, and demolishable. Add it as a child of the object and point root at the object. settings decides which actions are allowed.
Source: addons/grid_placement/components/manipulatable.gd
Syntax
class Manipulatable extends PlacementSystemsComponentMembers
| Name | Kind | Summary |
|---|---|---|
keep_during_preview | Field | Marks this script to be kept on preview instances during placement. |
manipulation_finished | Signal | Emitted when a move or other manipulation of this 2D object finishes, so the object can react. Passes the transform before and after. |
manipulation_finished_3d | Signal | 3D version of manipulation_finished. |
settings | Property | Which actions are allowed on this object (move, rotate, flip, demolish) and the extra rules a move must pass. |
build_cost_rule | Property | Optional. The cost rule used to work out the refund when this object is demolished. Point it at the same SpendMaterialsRuleById resource used to build the object so the cost is defined in one place.Objects placed from a ScenePlacementEntry can leave this empty; their cost is found through SceneEntryInstance. See BuildCost.resolve_for(). |
root | Property | The object that gets moved, rotated, flipped, or demolished. Usually the parent of this node. |
resolve_placement_dependencies | Method | |
is_root_hierarchy_valid | Method | |
create_copy | Method | |
get_move_rules | Method | |
is_demolishable | Method | |
is_movable | Method | |
validate_setup | Method | |
get_issues | Method | |
complete_manipulation | Method | |
new_transform | Property | |
complete_manipulation_3d | Method | |
root_3d | Property |
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