From 534c39570a37f24124f85d6f0801382b9377b524 Mon Sep 17 00:00:00 2001 From: Pavel Rojtberg Date: Fri, 15 Jul 2022 18:10:12 +0200 Subject: [PATCH] Main: StaticGeometry - logError if Root SceneNode is transformed --- OgreMain/src/OgreStaticGeometry.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OgreMain/src/OgreStaticGeometry.cpp b/OgreMain/src/OgreStaticGeometry.cpp index a5be9967e3c..c4f32ab0aff 100644 --- a/OgreMain/src/OgreStaticGeometry.cpp +++ b/OgreMain/src/OgreStaticGeometry.cpp @@ -491,6 +491,12 @@ namespace Ogre { //-------------------------------------------------------------------------- void StaticGeometry::addSceneNode(const SceneNode* node) { + if(node->getCreator()->getRootSceneNode()->_getFullTransform() != Affine3::IDENTITY) + { + // otherwise it is applied twice + LogManager::getSingleton().logError("StaticGeometry - Root SceneNode transform must be IDENTITY"); + } + for (auto mobj : node->getAttachedObjects()) { if (mobj->getMovableType() == "Entity")