DragPathData
Summary
Section titled “Summary”Drag for a single drag operation between a start and end position
Properties
Section titled “Properties”start_position: Vector2
current_position: Vector2
time_held: float = 0.0
drag_distance: float = 0.0
last_tile: Vector2i
target_tile: Vector2i
next_tile: Vector2i
last_attempted_tile: Vector2i = Vector2i(999999, 999999)
positioner: Node2D
targeting_state: GridTargetingState
is_dragging: bool = true
Methods
Section titled “Methods”update( delta: float ) -> void
Updates the drag data with current frame delta time. Recalculates distance, time held, and target tile position for this drag operation.
delta
: float - Time elapsed since last frame in secondsget_tile_at_node_2d( p_map: TileMapLayer, p_global_position: Vector2 ) -> Vector2i
Converts global position to tile coordinates on the specified map. Helper function for converting world positions to tilemap coordinates.
p_map
: TileMapLayer - The tilemap layer to convert coordinates forp_global_position
: Vector2 - Global position to convert to tile coordinatesstop( )
Source
Section titled “Source”addons/grid_building/systems/building/data/drag_path_data.gd
This page was auto-generated from GDScript source. Edit the source file to improve documentation.
Generated on 2025-09-07