Currently, FOVHandlerBase only calls UpdateTerrainSeen when the terrain was unseen and is now seen.
This is good default behavior, but does not support some use cases well. For example, consider a case where the user wants to apply a "gradient" to FOV based on how far a cell is from the center. Even if a cell was visible last time and is still visible this time, the distance from the center will likely change.
Therefore, I propose the following changes:
FOV visibility handlers should take a flag at construction which specifies whether to call TerrainSeen on only NewlySeen cells, or on all cells in Seen. This will allow an easy way to handle the gradient type situation.
Parent_PlayerFOVRecalculated should be virtual. This acts as a worst-case way for a user to use the existing code if they need to do something very custom
Currently,
FOVHandlerBase
only callsUpdateTerrainSeen
when the terrain was unseen and is now seen.This is good default behavior, but does not support some use cases well. For example, consider a case where the user wants to apply a "gradient" to FOV based on how far a cell is from the center. Even if a cell was visible last time and is still visible this time, the distance from the center will likely change.
Therefore, I propose the following changes:
TerrainSeen
on onlyNewlySeen
cells, or on all cells inSeen
. This will allow an easy way to handle the gradient type situation.Parent_PlayerFOVRecalculated
should be virtual. This acts as a worst-case way for a user to use the existing code if they need to do something very custom