From 50b63baba3b9fad5729a591d811892fcf1f87fee Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 8 Jan 2021 00:28:19 +0200 Subject: [PATCH] Fix applying of single-component scaling curves --- source/animation.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/animation.cpp b/source/animation.cpp index 94c96809..e568d221 100644 --- a/source/animation.cpp +++ b/source/animation.cpp @@ -344,12 +344,18 @@ void Animation::ValueCurve<1>::apply(float x, Matrix &matrix) const float value = spline(x); if(target==POSITION || target==SCALE) { - Vector3 vec; - vec[component] = value; if(target==POSITION) + { + Vector3 vec; + vec[component] = value; matrix.translate(vec); + } else + { + Vector3 vec(1.0f, 1.0f, 1.0f); + vec[component] = value; matrix.scale(vec); + } } else if(target==EULER) { -- 2.43.0