HexMapLibrary icon indicating copy to clipboard operation
HexMapLibrary copied to clipboard

New functions to return bounding rect for each tile and entire grid

Open david-pfx opened this issue 6 years ago • 1 comments

The tile rect is useful for attaching visual content, the grid rect is useful for scaling the display view.

david-pfx avatar Mar 18 '19 00:03 david-pfx

Getting the bounds of the whole map is already possible by using HexMap.MapSizeData.Extents and ~.Center. I can additionally add a min and a max property so it is consistent with https://docs.unity3d.com/ScriptReference/Bounds.html .

An easy way to get the bounds of an individual tile sounds like a useful short cut for using Tile.CartesianPosition +adding/substracting the extents of a single tile.

AurelWu avatar Mar 18 '19 07:03 AurelWu