Expose player visibility in Udon
Uzer Tekton
Suggestion:
- Option 1: In class VRCPlayerApi, create a bool method SetVisibility(bool)which defaults to true, for toggling the overall visibility of a particular player, which includes their avatar and nameplate and any chat box they may create.
- Option 2: Alternatively, create multiple toggles to control each element individually, such as
SetAvatarVisibility()
SetNamePlateVisibility()
SetChatBoxVisibility()
SetStickerVisibility()
SetItemVisibility()
etc.
- In my opinion the second option offer better granularity of control and allows a more creative use.
Reason 1:
- Currently if we need to hide a remote player without changing their actual position, we need to exploit a desync station to achieve this effect. Surely that is not the intended use of a station and is in fact a bug.
- We should be allowed to modify a remote player's visibility with Udon, directly, without exploiting a bug.
- Meanwhile, world creators can transition to this method, thus allowing the station bug be fixed without affecting worlds that utilize it. Arguably this feature is a prerequisite of eventually fixing the station.
Reason 2:
- We can already control the audibility of a player, via SetVoiceDistanceFaretc.
- Combining SetVisibility(false)withSetVoiceDistanceFar(0f)andSetAvatarAudioFarRadius(0f)you can make someone completely disappear. Or, alternatively, make someone invisible but can still be heard.
Log In
Thad Gyther
I don't think the possibility to have stations out of sync is a bug. There are a lot more use cases than just for player hiding. One small example is a swing I made: you'd want to keep the player in the swing upright to lessen motion sickness, but have other players see them following the swing rotation.
But, I absolutely support this feature request. Just, please, don't "fix" stations in that sense. They have a lot of bugs, yes, but keep allowing local differences.
Anyway, here are a few use cases to support this feature request:
- Manual performance optimization for seperated rooms.
- Using player visibility in various game mechanics. Could be interesting for horror or puzzle games.
- Spectator mode for players that let them walk around while not interefering with a game.
- Have players only see each other when in the same level of a game. Since floating point precision errors get bigger when getting further away from the center, it can make sense to occupy the same space around the center instead of spreading out levels. (in fact, I need that for a future project)
- Private spaces (kind of like sub instances) as I had been using in my world "Thad Home of Cuddles".