OGDEVHARSH
OGDEVHARSH5mo ago

Room members are not syncing

On clicking on a common UI button player have to jump, it's working fine for host(player is jumping and syncing properly for others too) but when other player click the same button , they are not jumping neither in their device nor in host's. how to solve this?
3 Replies
kapa.ai
kapa.ai5mo ago
Hi @OGDEVHARSH. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- It seems like you're having issues with synchronization in Normcore. Here are a few things you might want to check: 1. Datastore: Ensure that the state of the button click is being properly stored and updated in the room's datastore. The datastore is responsible for synchronizing state across all clients. If you make a change to the datastore, it’s automatically replicated to all connected clients. Learn more about the datastore here (https://normcore.io/documentation/architecture/client#datastore). 2. RealtimeModelEvent: Check if you're using the RealtimeModelEvent correctly. This event fires when a property is changed locally or remotely. It's a useful signal to update your scene to match the model. Learn more about RealtimeModelEvent here (https://normcore.io/documentation/reference/classes/RealtimeCallbackAttribute). 3. Serialization: Ensure that the object you're trying to sync can be serialized. Only primitives (int, float, Vector3, string, etc.) can be serialized. If you need to sync a specific kind of object, you should create a field for each property on the object that you’d like to sync. Learn more about serialization here (https://normcore.io/documentation/room/common-questions#when-i-try-to-sync-a-specific-object-to-the-datastore-i-get-an-error-that-says-it-cannot-be-serialized-whats-the-issue). 4. RPCs: If you're using RPC messages, remember that they make consistent synchronization difficult, especially for players that join a room late. Any state modified in response to an RPC message will need to be manually synchronized by your own code. Learn more about RPCs here (https://normcore.io/documentation/room/room#rpcs). Remember, Normcore is designed to be as bandwidth and CPU efficient as possible, so model updates should not be more expensive than RPCs. If you're still having issues, you might want to check the Normcore documentation (https://normcore.io/documentation) for more information. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai5mo ago
<@1236959362497646721> kapa.ai is still learning and improving, please let us know how it did by reacting below
Mechabit
Mechabit5mo ago
if the view is owned by a player only they can make changes to the model the solution is to make the view unowned then every player can change the model