diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp index cec38c8fc6..1853b07e19 100644 --- a/modules/gltf/gltf_document.cpp +++ b/modules/gltf/gltf_document.cpp @@ -6016,7 +6016,7 @@ void GLTFDocument::_import_animation(Ref state, AnimationPlayer *ap, for (int j = 0; j < track.weight_tracks[i].times.size(); j++) { const float t = track.weight_tracks[i].times[j]; const float attribs = track.weight_tracks[i].values[j]; - animation->track_insert_key(track_idx, t, attribs); + animation->blend_shape_track_insert_key(track_idx, t, attribs); } } else { // CATMULLROMSPLINE or CUBIC_SPLINE have to be baked, apologies. @@ -6025,6 +6025,11 @@ void GLTFDocument::_import_animation(Ref state, AnimationPlayer *ap, bool last = false; while (true) { _interpolate_track(track.weight_tracks[i].times, track.weight_tracks[i].values, time, gltf_interp); + for (int j = 0; j < track.weight_tracks[i].times.size(); j++) { + const float t = track.weight_tracks[i].times[j]; + const float attribs = track.weight_tracks[i].values[j]; + animation->blend_shape_track_insert_key(track_idx, t, attribs); + } if (last) { break; } diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index 9a1aedc2da..1f000d5f39 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -525,7 +525,7 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, double ERR_CONTINUE(cache_update_size >= NODE_CACHE_UPDATE_MAX); nc->accum_pass = accum_pass; cache_update[cache_update_size++] = nc; - nc->blend_shape_accum = 0; + nc->blend_shape_accum = blend; } else { nc->blend_shape_accum = Math::lerp(nc->blend_shape_accum, blend, p_interp); }