summaryrefslogtreecommitdiff
path: root/scene/animation
diff options
context:
space:
mode:
Diffstat (limited to 'scene/animation')
-rw-r--r--scene/animation/animation_player.cpp8
-rw-r--r--scene/animation/animation_tree.cpp4
2 files changed, 6 insertions, 6 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index b657833a3b..9ef6b9864a 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -395,9 +395,9 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, float
} else {
- nc->loc_accum = nc->loc_accum.linear_interpolate(loc, p_interp);
+ nc->loc_accum = nc->loc_accum.lerp(loc, p_interp);
nc->rot_accum = nc->rot_accum.slerp(rot, p_interp);
- nc->scale_accum = nc->scale_accum.linear_interpolate(scale, p_interp);
+ nc->scale_accum = nc->scale_accum.lerp(scale, p_interp);
}
} break;
@@ -950,13 +950,13 @@ void AnimationPlayer::_animation_process(float p_delta) {
play(queued.front()->get());
String new_name = playback.assigned;
queued.pop_front();
- if (end_notify)
+ if (end_notify || playback.seeked)
emit_signal(SceneStringNames::get_singleton()->animation_changed, old, new_name);
} else {
//stop();
playing = false;
_set_process(false);
- if (end_notify)
+ if (end_notify || playback.seeked)
emit_signal(SceneStringNames::get_singleton()->animation_finished, playback.assigned);
}
end_reached = false;
diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp
index f8b3ca291b..56e224819f 100644
--- a/scene/animation/animation_tree.cpp
+++ b/scene/animation/animation_tree.cpp
@@ -958,7 +958,7 @@ void AnimationTree::_process_graph(float p_delta) {
if (err != OK)
continue;
- t->loc = t->loc.linear_interpolate(loc, blend);
+ t->loc = t->loc.lerp(loc, blend);
if (t->rot_blend_accum == 0) {
t->rot = rot;
t->rot_blend_accum = blend;
@@ -967,7 +967,7 @@ void AnimationTree::_process_graph(float p_delta) {
t->rot = rot.slerp(t->rot, t->rot_blend_accum / rot_total).normalized();
t->rot_blend_accum = rot_total;
}
- t->scale = t->scale.linear_interpolate(scale, blend);
+ t->scale = t->scale.lerp(scale, blend);
}
} break;