Browse Source

Fix capture interpolation mode in Animation, closes #24015

Juan Linietsky 6 years ago
parent
commit
0c54e6344b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scene/resources/animation.cpp

+ 1 - 1
scene/resources/animation.cpp

@@ -1815,7 +1815,7 @@ Variant Animation::value_track_interpolate(int p_track, float p_time) const {
 
 	bool ok = false;
 
-	Variant res = _interpolate(vt->values, p_time, vt->update_mode == UPDATE_CONTINUOUS ? vt->interpolation : INTERPOLATION_NEAREST, vt->loop_wrap, &ok);
+	Variant res = _interpolate(vt->values, p_time, (vt->update_mode == UPDATE_CONTINUOUS || vt->update_mode == UPDATE_CAPTURE) ? vt->interpolation : INTERPOLATION_NEAREST, vt->loop_wrap, &ok);
 
 	if (ok) {