You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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:
Create a large SpriteRenderer/TilemapRenderer that acts as the Fog. Have it render on top of the Renderers you want to cover by changing the Sorting Layer and Order. Set the mask interaction to Visible Outside of Mask.
For each of your GameObjects that reveal the Fog, add a SpriteMask. The SpriteMask should have a Sprite that represents the area of Fog that you want to reveal. Set the Range Start and End such that the Sorting Layer and Order above for the Fog Renderer is in between the Range Start and End.
The GameObjects with the SpriteMask will make the parts of the Fog visible based on its position and the Sprite used.
If you have certain requirements for using Tiles specifically, do let us know!
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.
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?
The text was updated successfully, but these errors were encountered: