X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fanimation.cpp;h=e568d2217f1ff18f54323509e455c6b61443881a;hb=50b63baba3b9fad5729a591d811892fcf1f87fee;hp=94c96809214215aa890797a24a9c774ff0401f74;hpb=11629d96f9cce3ae7f60132d1fe560ded02c9200;p=libs%2Fgl.git 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) {