Class ManipulationParent
- Namespace
- GridPlacement.GDScript
- Assembly
- MoonBark.GridPlacement.GDScript.dll
ManipulationParent - Transform container for preview objects during manipulation.\n\nApplies rotation, translation, and scale transforms to preview objects during building/manipulation. All child nodes automatically inherit these transforms through Godot's scene tree.\n\n## IndicatorManager Parenting\n\nIndicators are ALWAYS parented to IndicatorManager.\n\nIMPORTANT: IndicatorManager should be parented to ManipulationParent (not as a sibling). This ensures indicators inherit rotation and transform from ManipulationParent via scene tree.\n\nTop-Down/Platformer: IndicatorManager as child of ManipulationParent (indicators rotate with preview) Isometric: IndicatorManager as child of ManipulationParent (indicators maintain correct orientation)\n\n## Key Methods - apply_rotation(degrees) - Rotate this node and all children - apply_horizontal_flip() - Flip horizontally - apply_vertical_flip() - Flip vertically - reset() - Reset to identity transform\n\n## Transform Behavior - Manipulation start: Resets to identity - During manipulation: Accumulates transforms - Manipulation end/cancel: Resets to identity\n\nFor detailed parenting decisions, isometric considerations, and architectural patterns: See [b]docs/v5-0-0/guides/isometric_implementation.mdx[/b]\n\nFor system architecture: See [b]docs/systems/parent_node_architecture.md[/b]
class ManipulationParent extends GBNode2D
Fields
GBGridRotationUtils
const GBGridRotationUtils = preload("res://addons/grid_building/utils/gb_grid_rotation_utils.gd")
Properties
new_rotation_deg
var new_rotation_deg: float = GBGridRotationUtils.rotate_node_counter_clockwise(self, target_map, increment_degrees)
new_rotation_deg
var new_rotation_deg: float = GBGridRotationUtils.rotate_node_counter_clockwise(self, target_map, increment_degrees)
failed
var failed = ManipulationData.new(states.manipulation.get_manipulator(), states.manipulation.data.source, null, GBEnums.Action.FLIP_V)
target_map
var target_map = _get_target_map_from_states(states)
failed
var failed = ManipulationData.new(states.manipulation.get_manipulator(), states.manipulation.data.source, null, GBEnums.Action.FLIP_V)
target_map
var target_map = _get_target_map_from_states(states)
failed
var failed = ManipulationData.new(states.manipulation.get_manipulator(), states.manipulation.data.source, null, GBEnums.Action.FLIP_V)
failed
var failed = ManipulationData.new(states.manipulation.get_manipulator(), states.manipulation.data.source, null, GBEnums.Action.FLIP_V)
manipulation_data
var manipulation_data = _manipulation_state.data
manipulation_settings
var manipulation_settings = _get_manipulation_settings()
actions
var actions = _get_actions()
manipulatable_settings
var manipulatable_settings = manipulation_data.target.settings if manipulation_data.target else null
states
var states = _container.get_states() if _container else null
settings
var settings = _container.get_settings()
validation_issues
var validation_issues = get_runtime_issues()
issues
var issues: Array[String] = []
Methods
reset
func reset() -> void:
Returns
apply_rotation
func apply_rotation(degrees: float) -> void:
Parameters
degrees
Returns
apply_grid_rotation_clockwise
func apply_grid_rotation_clockwise(target_map: TileMapLayer, increment_degrees: float = 90.0) -> float:
Parameters
target_mapincrement_degrees
Returns
apply_grid_rotation_counter_clockwise
func apply_grid_rotation_counter_clockwise(target_map: TileMapLayer, increment_degrees: float = 90.0) -> float:
Parameters
target_mapincrement_degrees
Returns
apply_horizontal_flip
func apply_horizontal_flip() -> void:
Returns
apply_vertical_flip
func apply_vertical_flip() -> void:
Returns
handle_transform_input
func handle_transform_input( event: InputEvent,
resolve_gb_dependencies
func resolve_gb_dependencies(p_container : PlacementContainer) -> void:
Parameters
p_container
Returns
get_runtime_issues
func get_runtime_issues() -> Array[String]: