diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp index 3aa48a63882..8fd75599ae1 100644 --- a/editor/import/editor_scene_importer_gltf.cpp +++ b/editor/import/editor_scene_importer_gltf.cpp @@ -3002,8 +3002,8 @@ void EditorSceneImporterGLTF::_import_animation(GLTFState &state, AnimationPlaye animation->track_set_imported(track_idx, true); //first determine animation length - const float increment = 1.0 / float(bake_fps); - float time = 0.0; + const double increment = 1.0 / bake_fps; + double time = 0.0; Vector3 base_pos; Quat base_rot; @@ -3092,8 +3092,8 @@ void EditorSceneImporterGLTF::_import_animation(GLTFState &state, AnimationPlaye } } else { // CATMULLROMSPLINE or CUBIC_SPLINE have to be baked, apologies. - const float increment = 1.0 / float(bake_fps); - float time = 0.0; + const double increment = 1.0 / bake_fps; + double time = 0.0; bool last = false; while (true) { _interpolate_track(track.weight_tracks[i].times, track.weight_tracks[i].values, time, gltf_interp);