Unity-Technologies / 2d-extras

Fun 2D Stuff that we'd like to share!
Other
1.55k stars 343 forks source link

[Feature Request]: Fog-Tile #326

Open superfrantv opened 2 years ago

superfrantv commented 2 years ago

Hello, i'am currently playing The Settlers 4 and there is a fog over the map where there are no troops from me. Is it possible to create a tile that automatically clears or deactivates the fog in certain places?

ChuanXin-Unity commented 2 years ago

I do not think Tiles themselves can automatically do that, since they do not update their logic continuously. You may have to rely on other scripts to update it, such as setting Tiles or removing them to simulate the Fog.

I would suggest making use of the SpriteMask component. The following could be how you do so:

If you have certain requirements for using Tiles specifically, do let us know!

superfrantv commented 2 years ago

I think SpriteMask is a performance hitter, i currently do it with a extra tilemap and set each tile individual, the fog should only removed if any troop is in range, but should come back if the troop goes out of range.

i'am interested to use the ShaderGraph to make Hexagon Tiles become special effects like water animation or something.