<aside> 💡 Using VaFogOfWar plugin for Unreal Engine 4 :)


General Considerations

There are four entities you should take into consideration:

  1. AVaFogBoundsVolume sets the region that covered with fog of war
  2. AVaFogLayer responsible for one individual fog visibility layer
    1. AVaFogTerrainLayer subclass for initial terrain/obstacles state
  3. UVaFogAgentComponent is the one who reveales the cloaked territory (or blocks visibility cells)
  4. AVaFogBlockingVolume blocks multiple cells at once

So, to setup fog of war for your own game you should:

Step 1. Add fog bound volume


Step 2. Add fog layers and link them with bounds volume


At this step you should set:

  1. Layer Channel — defines how layer will handle fog agents:
    1. EVaFogLayerChannel::Permanent — once revealed it will stay revealed
    2. EVaFogLayerChannel::Scouting — handles actual revealed zone by active agents
    3. EVaFogLayerChannel::Terrain — keeps state of walls, trees and other obstacles
  2. Bound Volume — reference to actor added at the Step 1.

Step 3. Setup initial terrain level with blocking volumes


You can markup initial terrain layers with AVaFogBlockingVolume actors. Just set the height level you want to "paint" with the volume: