gubebra
gubebra3mo ago

How can I disconnect another player from the game

I need to disconnect a player with another player. Can I do that?
6 Replies
kapa.ai
kapa.ai3mo ago
Hi @gubebra. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- I'm sorry, but based on the provided knowledge sources, there is no direct way to disconnect another player from a game in NormalVR. The disconnection process is typically handled by the client-side of the application, meaning a player can only disconnect themselves. For instance, the Realtime class in NormalVR provides a Disconnect() method that allows a client to disconnect from a room, but this action can only be initiated by the client who wishes to disconnect.
void Disconnect()
void Disconnect()
This method disconnects from a room. However, it's important to note that you should not attempt to disconnect another player from the game as it can lead to a poor user experience and may be against the terms of service of the platform. If you're looking to manage player behavior in your game, consider implementing game rules or systems that can handle disruptive behavior, such as a reporting system or a vote-to-kick feature. For more information, you can refer to the NormalVR documentation (https://normcore.io/documentation/). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai3mo ago
<@599054560270483456> kapa.ai is still learning and improving, please let us know how it did by reacting below
gubebra
gubebra3mo ago
I only need to to implement this feature because I need to disconnect a player if he is idling. Since my game runs on Quest, whenever a player locks the headset no further updates run on his side. I tried disconnecting him on the OnApplicationPause event but that doesn't work. So as suggested here: https://discord.com/channels/393839515074297858/1254845810319818753, I needed a way of disconnecting someone @Normcore Assistant
Discord
Discord - Group Chat That’s All Fun & Games
Discord is great for playing games and chilling with friends, or even building a worldwide community. Customize your own space to talk, play, and hang out.
kapa.ai
kapa.ai3mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- Based on the provided knowledge sources, there isn't a direct method to disconnect another player from a game in NormalVR. However, you can design your game in such a way that if a player is idle for a certain period of time, they are automatically disconnected. One way to achieve this could be to implement a timer on the server side that resets every time a player performs an action. If the timer reaches a certain threshold without being reset (indicating the player is idle), you could then trigger the disconnection. However, it's important to note that the disconnection process is typically handled by the client-side of the application, meaning a player can only disconnect themselves. For more information, you can refer to the NormalVR documentation (https://normcore.io/documentation/). Please note that forcibly disconnecting players can lead to a poor user experience and may be against the terms of service of the platform. It's recommended to inform players about this feature and provide them with the option to rejoin the game. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai3mo ago
<@599054560270483456> kapa.ai is still learning and improving, please let us know how it did by reacting below
Mechabit
Mechabit3mo ago
as you say, when a client stops responding they can't process any commands and only players can disconnect themselves. they'll eventually time out but you can also hide their avatar while you wait for the timeout just set the renderers and collider to disabled