From 536cc55d7a705f932f93132dad98628c2edda1b3 Mon Sep 17 00:00:00 2001 From: Ariel Manzur Date: Fri, 18 Aug 2017 03:07:01 -0300 Subject: [PATCH] Fixes animation bug for tracks that loop --- scene/resources/animation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index d86c476ef4..c77eb8cfaf 100644 --- a/scene/resources/animation.cpp +++ b/scene/resources/animation.cpp @@ -1455,7 +1455,7 @@ void Animation::value_track_get_key_indices(int p_track, float p_time, float p_d if (from_time>to_time) { // handle loop by splitting - _value_track_get_key_indices_in_range(vt,length-from_time,length,p_indices); + _value_track_get_key_indices_in_range(vt,from_time,length,p_indices); _value_track_get_key_indices_in_range(vt,0,to_time,p_indices); return; }