pablogila / TileMapDual_godot_node

An automatic, real-time dual-grid tileset system for Godot
MIT License
206 stars 8 forks source link

Strange artifacts when using directional lighting #11

Open StormLight14 opened 1 week ago

StormLight14 commented 1 week ago

The DualTileMap node has worked awesomely for me, so first thanks a ton for making this :) I am adding a DirectionalLight2D to my game, and I noticed a weird effect that came from it. There is transparent layer of tile fragments visible when using it.

Both my Grass and Path tilesets seem to have it: image

My solution was to firstly create a parent Node2D for the DualTileMap nodes, then modify the DualTileMap.gd to have get_parent().add_child(display_tilemap) rather than just add_child(display_tilemap), on line 121. The issue goes away after that, but does still appear in the editor. image

Finally, my scene tree: image

I'm very sorry if this is not an actual issue and I just had to do something else that is more simple!

pablogila commented 1 week ago

This looks weird. Do you mind doing a pull request of your modification?

Edit: would you mind sharing your tilemaps? I don't really see why would you use sepatate tilemaps for grass and dirt.