CFOWMaker
Overview
UCFOWMaker is the core fog of war builder. It manages two render targets (line-of-sight and revealed areas), a UDynamicMeshComponent plane sized to the current room cluster, and dynamic material instances for both the fog mesh and an optional post-process volume. It implements ICCell and ICPlayerControllerBoundable to react to perspective changes.
Properties
| Name | Description |
|---|---|
| fogMakerStruct | Copy of the FCFOWMakerStruct configuration |
| renderTarget2D | Render target for current line-of-sight painting |
| renderTarget2DRevealed | Render target for previously revealed areas |
| fogDynamicMaterial | Dynamic material instance applied to the fog mesh plane |
| dynamicMeshComponent | Dynamic mesh component representing the fog plane |
| postProcessFogDynamicMaterial | Optional dynamic material instance for post-process fog compositing |
| currentFogOfWar | Pointer to the current cluster FCRectangle being fogged |
| topView | True when the camera is in first-person perspective (fog disabled) |
| built | True once the fog maker has been fully initialized |
Functions
| Name | Description |
|---|---|
| instanciate | Static factory that creates the fog maker, render targets, materials and mesh |
| buildASync | Async entry point called each tick: checks if fog needs redrawing, enqueues commands |
| wantDraw | Returns true if the fog should be recomputed (rooms built, not in top view, queue empty) |
| drawFog | Async: finds the closest cluster and enqueues a cluster change or mesh clear |
| updateFog_sync | Game thread: dequeues commands, clears render targets, rebuilds the mesh plane |
| setMinimapZDistance | Updates the minimap distance parameter on the fog material |
| isBuilt | Returns true if the fog maker is initialized |
| clean | Unbinds from the player controller events |
| onPerspectiveTypeChange | Reacts to camera perspective changes (disables fog in first person) |