diff options
author | Vivatchai Kaveeta <goodytong@gmail.com> | 2018-09-10 19:54:38 +0700 |
---|---|---|
committer | Vivatchai Kaveeta <goodytong@gmail.com> | 2018-09-10 20:02:39 +0700 |
commit | 463ead1eb7fafe8b52e32d41a095e256879d9628 (patch) | |
tree | 587fd78fca46d0ab9708950f67acc58ea64c71d0 | |
parent | 0f6803ea779d46daeedcefa18d9d257fd661a86b (diff) |
Fix cubic spline interpolation in glTF importer
Should solve #21001 #14636
-rw-r--r-- | editor/import/editor_scene_importer_gltf.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp index 3d3dc978bc..ce3f34010d 100644 --- a/editor/import/editor_scene_importer_gltf.cpp +++ b/editor/import/editor_scene_importer_gltf.cpp @@ -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); |