From 5ab557eb053934d5fcd41704afbcd6d4ecbc3f4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 27 Dec 2010 23:06:34 +0100 Subject: [PATCH] Fixed transform inheritance in Scene. I just can't get it right on first try. --- src/Scene.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Scene.cpp b/src/Scene.cpp index 4b3b4face..b86bb2eaa 100644 --- a/src/Scene.cpp +++ b/src/Scene.cpp @@ -55,7 +55,7 @@ void Scene::draw() { void Scene::drawChildren(AbstractObject* object, const Matrix4& transformationMatrix) { for(set::const_iterator it = object->children().begin(); it != object->children().end(); ++it) { /* Transformation matrix for the object */ - Matrix4 matrix = (*it)->transformation()*transformationMatrix; + Matrix4 matrix = transformationMatrix*(*it)->transformation(); /* Draw the object and its children */ (*it)->draw(matrix, _camera->projectionMatrix());