diff --git a/jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf/TrackData.java b/jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf/TrackData.java index c453e5f7aa..eabd234f1c 100644 --- a/jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf/TrackData.java +++ b/jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf/TrackData.java @@ -221,7 +221,8 @@ private void populateTransform(Type type, int index, List keyFrames, K } else { //interpolation between the previous transform and the next one. KeyFrame lastKeyFrame = keyFrames.get(transformIndices.last); - float ratio = currentKeyFrame.time / (nextKeyFrame.time - lastKeyFrame.time); + float ratio = (currentKeyFrame.time - lastKeyFrame.time) + / (nextKeyFrame.time - lastKeyFrame.time); interpolate(type, ratio, lastKeyFrame, nextKeyFrame, index); }