diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-09-12 14:12:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-12 14:12:32 +0200 |
commit | cc5ab222040a0e896e9d88cd9fb2df782c00ad58 (patch) | |
tree | fa50b8804bb0aac9ef732eb00b32766cdeb04817 | |
parent | c7fc3dcab3c030ba8428036f6cbb1350b5312f8e (diff) | |
parent | 463ead1eb7fafe8b52e32d41a095e256879d9628 (diff) |
Merge pull request #21935 from goodyttoor/gltf_cubic
Fix cubic spline interpolation in glTF importer
-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 80713a157b..85383fd69d 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); |