I’ve been fiddling with render “holos”, and discovered that I could use util.IsSkyboxVisibleFromPoint to draw a line to where your player can see outside a building from, be it a doorway or window. However I’ve found that certain results don’t seem to make sense.
The following examples are near the color room on gm_construct, using the code
local function visibletostring(visible)
if(visible) then return "Yes"
else return "No" end
end
function CanSeeSkybox()
local isVisible = util.IsSkyboxVisibleFromPoint(LocalPlayer():EyePos())
Msg("Can See skybox from EyePos? ")
MsgN(visibletostring(isVisible))
end
hook.Add("RenderScreenspaceEffects", "canseeskybox", CanSeeSkybox)
The first example seems correct, you cannot see the skybox from this position.
However step to the right just a slight bit, and you somehow can see the skybox.
If I step forward a slight bit the skybox also becomes visible from this spot in the color room.
Can anybody explain how util.IsSkyboxVisibleFromPoint works, or is the function possibly broken/incomplete?
And finally how could I get a direction vector from where we can see the skybox from? (possibly a future feature request)