From 681eb3e91efe13fdf8e6ba9fd50f2f3587ff91eb Mon Sep 17 00:00:00 2001 From: nsg <40836757+Nor-s@users.noreply.github.com> Date: Wed, 1 Jun 2022 17:41:27 +0900 Subject: [PATCH] Fix Import a specific FBX model --- code/AssetLib/FBX/FBXConverter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/AssetLib/FBX/FBXConverter.cpp b/code/AssetLib/FBX/FBXConverter.cpp index 4de142075..43be6d28d 100644 --- a/code/AssetLib/FBX/FBXConverter.cpp +++ b/code/AssetLib/FBX/FBXConverter.cpp @@ -3318,9 +3318,9 @@ FBXConverter::KeyFrameListList FBXConverter::GetRotationKeyframeList(const std:: float vc = curve->GetValues().at(1); for (size_t n = 1; n < count; n++) { while (std::abs(vc - vp) >= 180.0f) { - float step = std::floor(float(tc - tp) / (vc - vp) * 179.0f); + double step = std::floor(double(tc - tp) / std::abs(vc - vp) * 179.0f); int64_t tnew = tp + int64_t(step); - float vnew = vp + (vc - vp) * step / float(tc - tp); + float vnew = vp + (vc - vp) * float(step / (tc - tp)); if (tnew >= adj_start && tnew <= adj_stop) { Keys->push_back(tnew); Values->push_back(vnew);