Manipulation Workflow
Why 5.0 splits manipulation into ManipulationSystem (logic) and ManipulationParent (visual transforms).
sort
Weight: 20
This guide captures a key 5.0-era architecture rule:
- ManipulationSystem owns the business logic.
- ManipulationParent owns visual transforms and input-driven transform changes.
Why this split exists
5.0-era manipulation intentionally separates:
- system orchestration + lifecycle
- from scene transform concerns
So that:
- the system remains testable (as much as possible in the 5.0 architecture)
- the node hierarchy remains understandable
Responsibilities
| Component | Role | Owns | Does NOT own |
|---|---|---|---|
ManipulationSystem | Business logic layer | lifecycle, validation, state transitions, high-level API | direct visual transforms, scene hierarchy decisions |
ManipulationParent | Visual transform layer (Node2D) | rotation/flip/scale container, transform input handling, holds preview + indicators | orchestration rules/validation |
Scene hierarchy shape (5.0 mental model)
| |
Defining Manipulation Settings
Configure manipulation behavior through the GBCompositionContainer:
ManipulationSettings Configuration
| |
Settings Assignment (Editor-Based)
Create ManipulationSettings Resource:
- In Inspector: Create New Resource →
ManipulationSettings - Save as
manipulation_settings.tres
- In Inspector: Create New Resource →
Configure Properties:
- Enable/disable rotation, flip, and movement features
- Set rotation snap angles and steps
- Configure grid snapping behavior
Assign to Container:
- Add to GBSettings →
manipulationproperty - Systems will automatically use these settings
- Add to GBSettings →
Marking Objects as Manipulatable
Adding Manipulatable Child Nodes
To enable rotation and flip functionality on placeable objects:
| |
Manipulatable Marker Setup
Create the marker node:
- Add a child Node named “Manipulatable”
- Attach the
manipulatable_marker.gdscript - Configure manipulation properties
Marker script example:
| |
Configuration Options
Rotation Control:
enable_rotation: Allow rotation shortcutscustom_pivot: Set rotation center point- Rotation follows ManipulationSettings snap angles
Flip Control:
enable_flip_horizontal: Allow horizontal flipenable_flip_vertical: Allow vertical flip- Flip operations respect object orientation
Visual Feedback:
- ManipulationParent shows rotation/flip previews
- IndicatorManager displays manipulation handles
- Visual feedback follows settings configuration
Key implication
- Preview copies and indicators are transformed together by the parent, while the system enforces workflow rules.
- Objects without a
Manipulatablechild node cannot be rotated or flipped - Settings control which manipulation features are available globally
This separation is a precursor to the later 5.1/6.0 direction: keep scene mutation localized and keep workflow logic centralized.