From: Mikko Rasa Date: Thu, 7 Jan 2021 22:28:19 +0000 (+0200) Subject: Fix applying of single-component scaling curves X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=50b63baba3b9fad5729a591d811892fcf1f87fee;p=libs%2Fgl.git Fix applying of single-component scaling curves --- 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) {