New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated state not being replicated to new joiners to a scene #443
Comments
I know there are issues if you test using two Chrome tabs, like the received messages are not processed until you are on the tab, so you may have time dependent issues, but that's probably not your issue here. Using two windows work fine. I guess you're using wseasyrtc adapter, right? So data are sent with WebSocket. I want to mention also a different issue we had with janus adapter (with unreliableTransport set to datachannel, so through WebRTC, the default, because we can also send data through websocket, that's configurable), sometime the avatar of the joined user didn't show up for the other users. My guess was the data may be sent too early before the DTLS handshake of the RTCPeerConnection, but I never confirmed that. We added a workaround to send an avatar firstSync every 5s with a periodic-full-syncs component, see #243 (comment) I still have the component in two of my projects, not sure if it's still needed. I don't think we had this issue with easyrtc adapter. |
I was using wseasyrtc when I first hit the problem, and implemented & tested my workaround. I have since moved to easyrtc, to enable audio between participants, and haven't noticed any differences (but didn't try backing out my workaround). I am now seing some odd issues with ownership changes not being replicated between clients when testing with side-by-side Chrom instances on desktop (2 windows, both visible). I doubt that is related to this, but I haven't understood it yet. |
I'm adding NAF support to an interactive A-Frame festive scene.
One problem I have noticed is that while entities are correctly synced between clients, when a new client joins the scene, entities that have been moved from their original positions don't get their positions updated until they are moved again.
I don't yet understand why this doesn't work.
On connection of a new client, NAF has code that will trigger a call to
NAF.entities.completeSync()
see code hereI've checked, and the new client connection is being detected, this code is being executed, and yet the entity positions aren't getting updated on the new client.
I have implemented a workaround, which is simply to make another call to
completeSync()
(this time withisFirstSync
set tofalse
) on detection of theclientConnected
event.This workaround is working fine for me, so I don't have a problem any more. But it seems like the existing NAF mechanism should have been adequate, and for some reason it wasn't.
I can re-construct the issue if someone wants to look into this. I don't think I'll be able to prioritize looking into this further in the short term, as I have a viable workaround in place.
The text was updated successfully, but these errors were encountered: