Fix cubic spline interpolation in glTF importer

Should solve #21001 #14636
This commit is contained in:
Vivatchai Kaveeta 2018-09-10 19:54:38 +07:00
parent 0f6803ea77
commit 463ead1eb7

View file

@ -1876,9 +1876,9 @@ T EditorSceneImporterGLTF::_interpolate_track(const Vector<float> &p_times, cons
float c = (p_time - p_times[idx]) / (p_times[idx + 1] - p_times[idx]);
T from = p_values[idx * 3 + 1];
T c1 = from + p_values[idx * 3 + 0];
T to = p_values[idx * 3 + 3];
T c2 = to + p_values[idx * 3 + 2];
T c1 = from + p_values[idx * 3 + 2];
T to = p_values[idx * 3 + 4];
T c2 = to + p_values[idx * 3 + 3];
return interp.bezier(from, c1, c2, to, c);