SLG Movement – Picking Tiles/Chess with collision polygons

This is an obvious one; Mouse/Touch inputs use the Sprite’s (frame’s) collision polygon to determine whether the Sprite has been clicked/touched.

Because an isometric tilesheet has spaces in between, the collision polygon will vary greatly between tiles. For the moment I’m doing this by hand.

However, I wonder if there was some way (by way of tools, perhaps) to procedural generate vertices so that it can be written back to the CAPROJ.

 

EDIT: There is a Tile Collision Editor in Tiled, which writes its information in the TMX file. It would be just a matter of working out the coordinates, and applying those settings in the CAPROJ. Of course, it would be better if a smart algorithm could take care of this. 🙂

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.