Description of the problem
It appears that when GLTFLoader creates SkinnedMesh’s, and binds them, the ‘matrixWorld’ upon binding is always identity:
https://github.com/mrdoob/three.js/blob/dev/examples/js/loaders/GLTFLoader.js#L2823
From debugging (r89), it seems that mesh.parent == null, and thus mesh.matrixWorld is identity (and will still be even after you call updateMatrixWorld).
This results in animations being incorrect when the original mesh transform is not identity. SkinnedMesh.bindMatrix ends up being identity, resulting in incorrect skinning math.
We have implemented a successful work around by calling updateMatrixWorld and then bind on our own. But the loader should do this by default.
Three.js version
- r89
Browser
- All of them
- Chrome
- Firefox
- Internet Explorer
OS
- All of them
- Windows
- macOS
- Linux
- Android
- iOS
We tried this and it works, so I’ll close this. Thanks!