What this component contains
ATTRIBUTION.mdLICENSEREADME.mdbaltor_test.gdcomponent.jsonhex_grid_math.gdinspect_gdscript.pyrun_tests.gdtest_package.pytests/test_hex_grid_math.gdverification/native.json
How it works
- Class
- BaltorHexGrid, extends RefCounted
- Methods
- axial_to_cube(hex: Vector2i) -> Vector3i; cube_to_axial(cube: Vector3i) -> Vector2i; cube_round(cube: Vector3) -> Vector3i; distance(a: Vector2i, b: Vector2i) -> int; neighbor(hex: Vector2i, direction: int) -> Vector2i; neighbors(hex: Vector2i) -> Array[Vector2i]; ring(center: Vector2i, radius: int) -> Array[Vector2i]; spiral(center: Vector2i, radius: int) -> Array[Vector2i]; and 7 more
- Placement
- res://baltor/godot_components/hex_grid_math/
Recorded checks
godot 4.7.2.stable.official.ed1daf0bf
godot_parse_check_onlygodot_gdscript_testsgodot_tests_reject_gutted_componentgodot_editor_importgodot_contract_reflectiongodot_readme_usage_compiles
Limits to consider
Axial and cube coordinates only (offset coordinates must be converted by the caller). Paths assume every step costs 1; use a weighted search for terrain costs. find_path stops after max_expanded expanded hexes and returns an empty array, so an unbounded passable area needs a bound in is_passable. Pixel conversion has no origin offset or non-uniform scale. Verified with Godot 4.7.2 headless; written against the Godot 4.3 API.