Merge pull request #21935 from goodyttoor/gltf_cubic

Fix cubic spline interpolation in glTF importer
This commit is contained in:
Rémi Verschelde 2018-09-12 14:12:32 +02:00 committed by GitHub
commit cc5ab22204
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);