deepnight / ldtk-haxe-api

LDtk level editor Haxe API (available on HaxeLib)
MIT License
94 stars 31 forks source link

set FlxSprite width and height to grid cell size #14

Closed jobf closed 3 years ago

jobf commented 3 years ago

When using the flixel render for LDtk layer I found that the collision boxes were incorrectly sized.

Looking at the code it is using the level width and level height to set the FlxSprite width and height.

This fix updates the render logic to use gridSize instead which is the size of the cell on a layer tile rather than the number of cells the level is wide or high.

wardy484 commented 3 years ago

Have tested and can confirm that this works.

deepnight commented 3 years ago

Sorry for the delay to merge! Done :)