Skeleton animations stalling / glitching

I have a mesh with skeleton that I’m cloning a number of times then calling scene.beginAnimation(mySkeleton, fromFrame, toFrame, true, 1) with different parameters for each. I’m seeing regular glitching - the animation simply stops. It seems to be related somehow to the mesh/skeleton being off screen. When the mesh/skeleton comes back into frame it’ll sometimes be stalled and then after a bit more camera movement the animation resumes. Skeleton animations don’t seem to be updated at all times. Is there a way I can force skeleton animation updates even if the mesh/skeleton is not on screen?

It’s worth noting that I’m animating the root bone location, not the mesh position, so possibly this could have something to do with it.

I added myMesh.alwaysSelectAsActiveMesh = true; before cloning the mesh and this seems to have solved the issue.

If true the mesh must be rendered in any case (this will shortcut the frustum clipping phase)

2 Likes