Chris' Tutorials
Docs/Grid Placement

Class

PlacementGridRotationUtils

Generated GDScript class reference for GridPlacement.PlacementGridRotationUtils.

StatusDraft
Versionv6.0
UpdatedDevelopment docs generated from GDScript source

This is unreleased documentation in active development. APIs, class names, and behavior may change before the final release.

Draft — Unreleased:This page is in active development. APIs, class names, and behavior may change before the release is finalized. Use it as a preview of what's coming — not as a stable integration target.

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
normalizedProperty
roundedProperty
cardinal_to_degreesMethod
rotate_clockwiseMethod
rotate_counter_clockwiseMethod
rotate_node_clockwiseMethod
current_rotation_degProperty
new_rotation_degProperty
target_global_rotationProperty
rotate_node_counter_clockwiseMethod
current_rotation_degProperty
new_rotation_degProperty
target_global_rotationProperty
set_node_directionMethod
target_global_rotationProperty
get_direction_tile_deltaMethod
get_opposite_directionMethod
is_horizontalMethod
is_verticalMethod
direction_to_stringMethod
current_tileProperty
normalizedProperty
rotate_and_move_nodeMethod
resultProperty
move_deltaProperty
parent_nodeProperty
parent_2dProperty
original_global_positionProperty
target_global_transformProperty
parent_global_transformProperty
required_local_transformProperty
required_local_rotationProperty

Source

addons/grid_placement/utils/placement_grid_rotation_utils.gd

Plugin docs root:gdscript/plugins/grid_placement_dev/docs