- Home /
How do we make fog of war?
I am developing an RTS game that needs fog of war. The game will have at most 200 units that can be seen through the main camera. So, how can we achieve fog of war?
Answer by Cherno · May 15, 2014 at 01:06 AM
There a many ways, but a popualr one is using a plane laid over the terrain with a black texture, and then letting units raycast against it upwards, thereby getting the nearest vertex from the raycast hit, and then changing the alpha value of the pixels of the texture around that vertex to zero.
Here is one way to do this:
Your answer
Follow this Question
Related Questions
Place a building in a RTS game (like Age Of empires 3) 0 Answers
How do you add levels to your game? 1 Answer
3d grid/tile based map 0 Answers
SelectTarget Does not exist Current Context 1 Answer
Some questions about RTS games 1 Answer