Animation getting out of sync on WebGL only

[Originally posted over in Animation, but after several days of chirping crickets, I realized this may be a better place to find help.]

I have a simple humanoid figure, which I rigged, imported as Humanoid, threw into a scene, and then added a couple of standard Mecanim animations (idle-shift and wave). It looks fine in the editor:

But when I build for WebGL, scary things happen (see for yourself here):

Wtf?!? And here’s the really weird thing… yes, the eyeballs are a separate submesh, but the helmet is not. The helmet is One with the rest of the head. I am not making this up:

And as far as I can tell, there is little to no difference between how the helmet part of this mesh is bound to the bones, and how the face is bound to the bones (as indicated by the color above). Playing around with the bones in the Unity editor, I can’t find any way to rotate, translate, or scale any of the bones to cause eye and helmet separation as seen in WebGL.

So, how is the scary effect with the helmet seen at all? And why would this effect show up in WebGL but not in the editor?

1 Like

That’s an interesting bug;) Would you be able to submit a bug report with a repro project?

Sure, though over in the other thread, we’ve made a bit of progress in understanding it:

  • In Unity 5.5, it occurs in the editor just as in WebGL (unlike Unity 5.4.1, where it happens in WebGL only).
  • It occurs even when the head/face mesh is bound only to two bones (Upper Spine and Head), with no other bones involved.
  • I’ve since found that I can fix it by, in Cheetah3D, weighing the Head bone more heavily.

So I think it must be something like: Unity 5.5 (and 5.4.1 WebGL) requires the vertex weights to add up to 1. When they do not, some error occurs somewhere in the animation pipeline, causing the vertices to not move at all.

But I still have no clue why this would affect the face but not the helmet and hair, when these are all the same mesh.