Possibility to check if a vector is in PVS and visible
3 replies, posted
I wanted to ask if anyone knows if there are functions or possibilities to check in Lua if a vector is visible from the players PVS and in general not behind an area portal or
something.
Entity/VisibleVec
Entity/TestPVS
I don’t recall ever using it myself so I don’t know if it’s exactly what you’re looking for. If not you can make your own using various traces.
The second function is working out, but it's not checking for area portals, right?
I don’t believe it checks for any entities in the way. You can probably just get away with using a single trace (from eyepos to the vector) in conjunction with TestPVS and see if that trace hits an area portal entity.
Sorry, you need to Log In to post a reply to this thread.