Bug report
Issue:
When moving or rotating a mesh object, the model stops animating.
The mesh snaps back to bind pose / T-pose immediately after transform change.
This affects skinned models with skeleton animation.
Root cause:
In instance.js, _pushTransformIfChanged() called this._model.updateTransformSync(this._instanceMatrix) for the entire model.
updateTransformSync() applies the instance transform to all meshes, including skinned meshes.
Applying that matrix to skinned bind-pose mesh data breaks skeletal animation and forces a T-pose.
Fix:
In instance.js, change _pushTransformIfChanged() so:
If there are skinned meshes:
- do not call this._model.updateTransformSync(...) for the whole model.
- update only non-skinned meshes with mesh.updateTransformSync(this._instanceMatrix).
- then call _updateSkinnedMeshes() to update skinned meshes correctly.
If there are no skinned meshes:
- keep this._model.updateTransformSync(this._instanceMatrix) as before.
File / location:
instance.js
method _pushTransformIfChanged()
Result:
Object movement/rotation no longer stops skinned model animation.
Skinned animations now continue correctly after transform changes.