Animation Sync
Hello,
I am trying to sync up animations with normcore, does anyone know a good starting point for this? I assume I can sync most things up using realtime.room.time but I was seeing if anyone already had a solution for this by chance.
2 Replies
Hi @wwm0nkey. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
You're on the right track with using
realtime.room.time
for synchronizing animations in Normcore. The Normcore documentation provides a specific example for this use case.
According to the Timers + Synchronized Playback guide, Normcore recommends using the synchronized clock to drive animation across all clients. This approach ensures that animations stay in sync without the need for constant updates from a main client.
Here's a basic implementation example from the guide:
1. Create a model to store the start time:
2. Create a Stopwatch component:
You can use this Stopwatch component to drive your animations. When you start an animation, call StartStopwatch()
, and then use the time
property to control your animation playback.
This approach ensures that all clients will play the animation in sync, even if they join the room late or temporarily disconnect. The guide notes that "If you're implementing synchronized music or animation playback, you can use this same technique to synchronize your timeline perfectly between all clients."
For a more detailed explanation and full implementation, including how to test it, I recommend reading the full Timers + Synchronized Playback guide.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@138172170965745665> Kapa.ai is still learning and improving, please let me know how I did by reacting below.