Hi there, I’ve been using the animation-mixer to animate a character’s idle breathing motion, however when I modify a bone in the render loop, it occasionally flickers to the position of the animation-mixer’s idle animation and then back to the modified position. Is there a way to prevent this fighting between the animation and my changes? I would like my changes to not be reset every loop if possible.
Encode your modification into an AnimationClip and play that on the object as well so that all modifications are happening through the animation system…
Or make sure that the bone you are manipulating isn’t being driven by a track in another animation… (by deleting/disabling the tracks for that bone in the animation)
Or make sure that your modifications to the bone are re-applied each frame, but only after the animationMixer.update() has been called.
Thanks for your response. I ended up doing your first solution, however this only works if the AnimationClip I create is non-static, otherwise it gets overridden by the other animation. So as a hack, I ended up adding a tiny imperceivable bone position change in the animation from beginning to end of the clip.
Also your third solution was the original problem that was causing my glb model to flicker, perhaps a bug in threejs?
Might be an order of operations issue. I thought that as long as you do the modification after the animationMixer.update() runs, you should be good… you might have to .updateMatrix() .updateMatrixWorld() on the bones after you animate them tho.