Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Is there a reason why the auto-generated shadows are not perfect? I thought that it would just use the polygon tilemap collider and compute the precise shape of the walls. Do you need something more than that?

yeah I was hoping it would do that too. It doesnt seem to be able to handle a merged wall object that well. Not sure though. It looks like this: link

Oh, I see. I might try this myself but it might take at least 1-2 days to get to that.

Thank you, take your time :). 

So I’ve done a fair bit of research and it seems like the main problem is with shadows in enclosed areas (which the dungeon is). You can see a discussion here: https://forum.unity.com/threads/script-for-generating-shadowcaster2ds-for-tilemaps.906767/#post-7220347 . And as far as I know, these people do not have a working solution for this. However, someone from Unity replied there that in Unity 2021.2 it should be possible to access collider shape primitives and that it may be easier to fix these problems. I also tried working on my own solution but it’d require quite a lot of polishing and would also probably become obsolete soon as 2021.2 is already in its beta stage. So I’d probably recommend waiting for the new version of Unity where it should be easier to automatically generate the shadow caster shapes.

Ok, thank you for your research! Will hold off on that front until the new version.