<aside> 💡 Using VaFogOfWar plugin for Unreal Engine 4 :)
</aside>
There are four entities you should take into consideration:
AVaFogBoundsVolume
sets the region that covered with fog of warAVaFogLayer
responsible for one individual fog visibility layer
AVaFogTerrainLayer
subclass for initial terrain/obstacles stateUVaFogAgentComponent
is the one who reveales the cloaked territory (or blocks visibility cells)AVaFogBlockingVolume
blocks multiple cells at onceSo, to setup fog of war for your own game you should:
At this step you should set:
Layer Channel
— defines how layer will handle fog agents:
EVaFogLayerChannel::Permanent
— once revealed it will stay revealedEVaFogLayerChannel::Scouting
— handles actual revealed zone by active agentsEVaFogLayerChannel::Terrain
— keeps state of walls, trees and other obstaclesBound Volume
— reference to actor added at the Step 1.You can markup initial terrain layers with AVaFogBlockingVolume
actors. Just set the height level you want to "paint" with the volume: