Having a bit of a problem between distinct character meshes. When they play an animation they synchronise.
The situation is that we load the same mesh separately for different players, then find the animations in the loader’s onSuccess arguments from the incoming animationGroups. They’re never intentionally synchronized.
This is giving me problems when I go to play animations. Either their idle animations are perfectly synchronised all the time (the idle animation is 13 seconds long so that’s obviously syncing) or when I go to play animations on the remote player, even though it’s being fed the values, the animation isn’t playing, possibly because the primary player isn’t playing that animation at the time.
I’ve made a function to brand structures with UUIDs so I can see if they’re being shared by anything, and they all seem to be unique. At the same time, sometimes during the loader’s onSuccess function, an animationGroup coming in as an argument already has a UUID from that process.
What can I do here? Would deep-copying the animation somehow break unwanted references, or is it some other aspect of Babylon causing it?
Edit: I found clone() so I cloned and assigned the skeleton, and cloned and assigned the animation groups.
The code is definitely telling the animations to play, and it’s the exact same code as the main character, and the scalar values are all correct, but the remote player representation still never plays its movement animations. However on reverting to idle it’s no longer in sync with the main player, so that’s something.