caewok / fvtt-elevated-vision

Adjust Foundry VTT vision, lighting, and token elevations based on terrain, wall, or token elevation.
MIT License
12 stars 5 forks source link

Vision broken when used with levels and perfect vision #26

Closed txm3278 closed 1 year ago

txm3278 commented 1 year ago

I have a map with 2 layers, one at 0, one at -30. Vision works fine on the base layer (0 elevation) but doesn't on any other level. I'm using both levels and perfect vision. This is the vision of a character with elevated vision enabled (No terrain has been elevated): image This is with elevated vision disabled: image

caewok commented 1 year ago

Thanks for this report. The short answer is that, for the given scene, you will need to set the minimum elevation in the scene settings to be equal or less than the minimum elevation you are using in Levels.

In the Scene Configuration, you should see an Elevated Vision box at the bottom. Change the Minimum Elevation to the minimum for the scene that you intend to use with Levels. (For the above images, this is probably -30.) Sorry, but at the moment, changing the Minimum Elevation will cause any elevations in the scene to change (issue #23). WIP.

I will think about ways to make this more obvious. I don't see an easy way to tell when the minimum scene elevation is changed in Levels, and so I don't want to just constantly check if this value has changed (which it rarely will).

caewok commented 1 year ago

I take it back... there is something else happening with Levels such that setting the minimum elevation for the scene is not always sufficient to fix the problem... Will look into it.

caewok commented 1 year ago

Fixed in v0.1.6. One caveat, however --- I think this requires you set the elevation for the terrain in and around the basement to the level of the basement. So if your cave above is at -30 and you are using a tile with Levels with a bottom range of -30, you should set the elevation of the terrain around the basement to -30 as well.

Alternatively, turning off "Apply elevation data to token vision" will correct the issue, because it is specific to how the vision shader works when that toggle is on.