Skip to content

Class

PlacementGridRotationUtils

Generated GDScript class reference for GridPlacement.PlacementGridRotationUtils.

Status
Current
Version
v6.3.0
Source updated
2026-10-29
Generated on
2026-10-29

6.3. These pages document the 6.3 release, where placeable is now entry (what changed) and PlacementOwner is deprecated (migration). Still on 6.2? Your version's guides ship inside the plugin itself, under addons/grid_placement/guides/; the 6.2 URLs on this site now redirect to this series.

Grid-aware object rotation utilities for 2D grid-based games. Provides clean, typed helper functions for rotating objects on a grid with proper alignment to grid tiles, particularly for isometric and square tile layouts. Supports configurable rotation increments (90°, 45°, 30°, 60°, or any custom angle). Key features:

  • Configurable rotation increments (4-direction, 8-direction, or any custom angle)
  • Cardinal direction rotation (backward compatible, convenience API)
  • Isometric-aware rotation handling with complex transform support
  • Snap-to-grid positioning after rotation
  • Integration with existing GridPositioner2D and PlacementPositioning2DUtils
  • Static methods for easy testing and reuse Usage Examples:
  • 4-direction (RTS-style): rotate_node_clockwise(node, map, 90.0)
  • 8-direction (isometric with diagonals): rotate_node_clockwise(node, map, 45.0)
  • 6-direction (hex-style): rotate_node_clockwise(node, map, 60.0)
  • 12-direction: rotate_node_clockwise(node, map, 30.0) Designed to work seamlessly with the existing Grid Building plugin architecture while providing specialized rotation functionality for grid-based gameplay.

Source: addons/grid_placement/utils/placement_grid_rotation_utils.gd

Syntax

class PlacementGridRotationUtils extends RefCounted

Members

NameKindSummary
degrees_to_cardinalMethod
cardinal_to_degreesMethod
rotate_node_clockwiseMethod
rotate_node_counter_clockwiseMethod
set_node_directionMethod
direction_to_stringMethod