You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently SF cannot add to a players PVS, this is kind of a limitation as E2/Cam controllers can do it.
Having some way to use SetupPlayerVisibility and AddOriginToPVS for the owner of the chip could be nice.
hook.Add( "SetupPlayerVisibility", "AddRTCamera", function( ply, viewEntity )
-- Adds any view entityifviewEntity:IsValid() and !viewEntity:TestPVS( ply ) then-- If we don't test if the PVS is already loaded, it could crash the server.AddOriginToPVS( viewEntity:GetPos() )
endend )
It might be easier to just have functions instead of a hook as the hook logic isn't entirely needed for sfs usecase.
For example: EnablePVSOverride( ply, bool ) together with PVSOverride( ply, pos ) to avoid the before mentioned crash issue.
Would also be vastly simpler for players to use and less laggy as SetupPlayerVisibility does run a lot which could be an issue for sf.
The text was updated successfully, but these errors were encountered:
Yes, but then you need a serverside holo (or other always-transmitted entity) to attach it to. It's also still limited to only one PVS origin, it doesn't let you have multiple.
And what if you're using renderview instead of calcview, for a seamless portal? setViewEntity also changes the player's eye position and angles, so it would require you to also use calcview.
Lots of cool rendering chips such as ones using renderview get restricted to relatively small areas because of the lack of PVS stuff, this would be incredible.
Currently SF cannot add to a players PVS, this is kind of a limitation as E2/Cam controllers can do it.
Having some way to use
SetupPlayerVisibility
andAddOriginToPVS
for the owner of the chip could be nice.https://gmodwiki.com/Global.AddOriginToPVS
Example from the wiki, note the possible crash if the hook is misused.
It might be easier to just have functions instead of a hook as the hook logic isn't entirely needed for sfs usecase.
For example:
EnablePVSOverride( ply, bool )
together withPVSOverride( ply, pos )
to avoid the before mentioned crash issue.Would also be vastly simpler for players to use and less laggy as
SetupPlayerVisibility
does run a lot which could be an issue for sf.The text was updated successfully, but these errors were encountered: