Im trying to apply this feature on my game for adding more tension & fear or whats Im gonna to find in the next corner. But I dont have any clue for this

AND adding a 3D character on 2D orthographic world like like Brawl Stars or similar Im doing just using sprite just build the prototype ATM

maybe you can overlay a texture in the hud. And erase alpha as needed.

For fog of war, I would look at using a shader-based solution that processes a screen-view of a fog of war colormask. The trick here is to have a Viewport with render layers that only it can see, but in the same world as game itself. Then you need can spawn white sprites to represent the areas that have been visited that are only visible to the Viewport and have the Viewport use a black background (via its Camera). Then you just need to make a TextureRect that covers the screen, give it the Viewport texture, and write a shader that discards the fragment if the color at the texture is white. This will leave the black color behind, making a fog of war that you can control via white sprites visible in the viewport.

Though, it may be simpler to just erase alpha from a texture, like @newmodels suggested. If your level doesn’t move especially, erasing alpha would be easier to implement.

For the 3D character in 2D, you probably want to render your character with an orthographic perspective at an angle that is similar to the 2D assets used. A Viewport with a medium size per each character probably would work okay for this, or one large viewport with all the characters (use texture regions to get each character out of the texture). Then you could just replace the sprite with a Viewport texture.

2 years later