Networked animation state? #2956
-
What would it take to network/sync animation state in the same way that video player state is synced - so that all connected clients are seeing more or less the same keyframes at the same time? As I understand it, video players are synced across clients by assigning a user as "timekeeper" - can this be done for looping, auto-playing animations, as well? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Related #2529 |
Beta Was this translation helpful? Give feedback.
-
Yep, you are correct in how video players are synced. One client is selected as the "owner" of that video, and they periodically sync time out to other clients. If one of the non-owner clients detects it is sufficiently deviated (we allow up to a few seconds) from the timekeeper they will seek their video to the correct time. Internally all the 3d model animations are played back using an |
Beta Was this translation helpful? Give feedback.
Yep, you are correct in how video players are synced. One client is selected as the "owner" of that video, and they periodically sync time out to other clients. If one of the non-owner clients detects it is sufficiently deviated (we allow up to a few seconds) from the timekeeper they will seek their video to the correct time.
Internally all the 3d model animations are played back using an
AnimationMixer
in ThreeJS https://threejs.org/docs/#api/en/animation/AnimationMixer, it hastime
property you can query and asetTime
method you can use to jump to a specific time. This is basically the only interface you need to do something similar, though it would definitely be some work. You would pr…