Chris' Tutorials
Docs/Grid Placement

Class

PlacementGeometryMath

Generated GDScript class reference for GridPlacement.PlacementGeometryMath.

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.

Geometry & collision math utilities for the grid building addon. Provides compact, well-documented helper functions used across the addon for tile/polygon overlap and collision tasks. Main responsibilities include:

  • Computing polygon vs polygon intersection areas (uses Godot Geometry2D).
  • Producing tile polygons for square and isometric tiles and testing polygon overlaps against tiles (area-based and optimized native collision checks).
  • Converting various Shape2D types to polygon approximations for geometry processing (Rectangle, Circle, Capsule, ConvexPolygon, fallback to rect).
  • Utility helpers: axis-aligned rectangle detection and polygon bounding rect. Note: TILE SHAPE ENFORCEMENT: All functions use TileSet.TileShape enum values.[br] Use: TileSet.TILE_SHAPE_SQUARE, TileSet.TILE_SHAPE_ISOMETRIC, TileSet.TILE_SHAPE_HALF_OFFSET_SQUARE [br] Do NOT use: integers (0, 1, 2) or strings ("square", "isometric", etc.)

Source: addons/grid_placement/utils/placement_geometry_math.gd

Syntax

class PlacementGeometryMath

Members

NameKindSummary
polygon_intersection_areaMethod
intersectionProperty
areaProperty
poly_areaProperty
jProperty
get_tile_polygonMethod
half_wProperty
half_hProperty
intersection_area_with_tileMethod
tile_polyProperty
areaProperty
does_polygon_overlap_tileMethod
areaProperty
does_shape_overlap_tile_optimizedMethod
tile_rect_shapeProperty
tile_transformProperty
native_resultProperty
shape_polygonProperty
shape_polygonProperty
does_polygon_overlap_tile_optimizedMethod
boundsProperty
rect_shapeProperty
rect_transformProperty
p1Property
p2Property
diffProperty
get_polygon_boundsMethod
min_posProperty
max_posProperty
convert_shape_to_polygonMethod
polygonProperty
rect_shapeProperty
sizeProperty
circle_shapeProperty
radiusProperty
segmentsProperty
angleProperty
pointProperty
capsule_shapeProperty
radiusProperty
heightProperty
segmentsProperty
half_heightProperty
top_center_yProperty
bottom_center_yProperty
angleProperty
pointProperty
angleProperty
pointProperty
convex_shapeProperty
rectProperty
intersection_polygon_areaMethod
areaProperty
nProperty
jProperty
is_exact_polygon_matchMethod
exact_polygon_areaMethod
isometric_floating_point_fallbackMethod
closeProperty
square_bounding_box_fallbackMethod
min_tileProperty
max_tileProperty
tile_rectProperty
min_polyProperty
max_polyProperty
poly_rectProperty
intersection_rectProperty
intersection_areaProperty
overlap_xProperty
overlap_yProperty

Source

addons/grid_placement/utils/placement_geometry_math.gd

Plugin docs root:gdscript/plugins/grid_placement_dev/docs