Index: code/branches/ogre1.9/src/libraries/util/DisplayStringConversions.h
===================================================================
--- code/branches/ogre1.9/src/libraries/util/DisplayStringConversions.h	(revision 11128)
+++ code/branches/ogre1.9/src/libraries/util/DisplayStringConversions.h	(revision 11129)
@@ -37,5 +37,10 @@
 
 #include "UtilPrereqs.h"
-#include <OgreOverlayElement.h>
+#include <OgrePrerequisites.h>
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlayElement.h>
+#else
+#   include <OgreOverlayElement.h>
+#endif
 
 #if OGRE_UNICODE_SUPPORT
Index: code/branches/ogre1.9/src/libraries/util/OgreForwardRefs.h
===================================================================
--- code/branches/ogre1.9/src/libraries/util/OgreForwardRefs.h	(revision 11128)
+++ code/branches/ogre1.9/src/libraries/util/OgreForwardRefs.h	(revision 11129)
@@ -67,5 +67,4 @@
     class Factory;
     class Font;
-    class FontPtr;
     class FontManager;
     struct FrameEvent;
@@ -73,5 +72,4 @@
     class Frustum;
     class GpuProgram;
-    class GpuProgramPtr;
     class GpuProgramManager;
     class GpuProgramUsage;
@@ -82,5 +80,4 @@
     class HardwarePixelBufferSharedPtr;
     class HighLevelGpuProgram;
-    class HighLevelGpuProgramPtr;
     class HighLevelGpuProgramManager;
     class HighLevelGpuProgramFactory;
@@ -96,5 +93,4 @@
     class ManualObject;
     class Material;
-    class MaterialPtr;
     class MaterialManager;
     class MaterialScriptCompiler;
@@ -104,5 +100,4 @@
     class MemoryManager;
     class Mesh;
-    class MeshPtr;
     class MeshSerializer;
     class MeshSerializerImpl;
@@ -179,5 +174,4 @@
     class SimpleSpline;
     class Skeleton;
-    class SkeletonPtr;
     class SkeletonInstance;
     class SkeletonManager;
@@ -195,5 +189,4 @@
     class TextureUnitState;
     class Texture;
-    class TexturePtr;
     class TextureFont;
     class TextureManager;
Index: code/branches/ogre1.9/src/modules/objects/Planet.cc
===================================================================
--- code/branches/ogre1.9/src/modules/objects/Planet.cc	(revision 11128)
+++ code/branches/ogre1.9/src/modules/objects/Planet.cc	(revision 11129)
@@ -31,5 +31,4 @@
 #include <OgreEntity.h>
 #include <OgreBillboardSet.h>
-#include <OgreProgressiveMesh.h>
 
 #include "core/CoreIncludes.h"
Index: code/branches/ogre1.9/src/modules/objects/Planet.h
===================================================================
--- code/branches/ogre1.9/src/modules/objects/Planet.h	(revision 11128)
+++ code/branches/ogre1.9/src/modules/objects/Planet.h	(revision 11129)
@@ -40,5 +40,4 @@
 #include <string>
 #include "tools/BillboardSet.h"
-#include "tools/Mesh.h"
 #include "tools/interfaces/Tickable.h"
 #include "graphics/Model.h"
Index: code/branches/ogre1.9/src/modules/overlays/FadeoutText.cc
===================================================================
--- code/branches/ogre1.9/src/modules/overlays/FadeoutText.cc	(revision 11128)
+++ code/branches/ogre1.9/src/modules/overlays/FadeoutText.cc	(revision 11129)
@@ -29,5 +29,9 @@
 #include "FadeoutText.h"
 
-#include <OgreTextAreaOverlayElement.h>
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreTextAreaOverlayElement.h>
+#else
+#   include <OgreTextAreaOverlayElement.h>
+#endif
 #include "util/Math.h"
 #include "core/CoreIncludes.h"
Index: code/branches/ogre1.9/src/modules/overlays/OverlayText.cc
===================================================================
--- code/branches/ogre1.9/src/modules/overlays/OverlayText.cc	(revision 11128)
+++ code/branches/ogre1.9/src/modules/overlays/OverlayText.cc	(revision 11129)
@@ -29,7 +29,13 @@
 #include "OverlayText.h"
 
-#include <OgreOverlayManager.h>
-#include <OgrePanelOverlayElement.h>
-#include <OgreTextAreaOverlayElement.h>
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlayManager.h>
+#   include <Overlay/OgrePanelOverlayElement.h>
+#   include <Overlay/OgreTextAreaOverlayElement.h>
+#else
+#   include <OgreOverlayManager.h>
+#   include <OgrePanelOverlayElement.h>
+#   include <OgreTextAreaOverlayElement.h>
+#endif
 
 #include "util/StringUtils.h"
Index: code/branches/ogre1.9/src/modules/overlays/hud/ChatOverlay.cc
===================================================================
--- code/branches/ogre1.9/src/modules/overlays/hud/ChatOverlay.cc	(revision 11128)
+++ code/branches/ogre1.9/src/modules/overlays/hud/ChatOverlay.cc	(revision 11129)
@@ -30,5 +30,10 @@
 
 #include <string>
-#include <OgreTextAreaOverlayElement.h>
+
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreTextAreaOverlayElement.h>
+#else
+#   include <OgreTextAreaOverlayElement.h>
+#endif
 
 #include "util/Convert.h"
Index: code/branches/ogre1.9/src/modules/overlays/hud/ChatOverlay.h
===================================================================
--- code/branches/ogre1.9/src/modules/overlays/hud/ChatOverlay.h	(revision 11128)
+++ code/branches/ogre1.9/src/modules/overlays/hud/ChatOverlay.h	(revision 11129)
@@ -33,5 +33,11 @@
 
 #include <list>
-#include <OgreOverlayElement.h>
+
+#include <OgrePrerequisites.h>
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlayElement.h>
+#else
+#   include <OgreOverlayElement.h>
+#endif
 
 #include "chat/ChatListener.h"
Index: code/branches/ogre1.9/src/modules/overlays/hud/HUDBar.cc
===================================================================
--- code/branches/ogre1.9/src/modules/overlays/hud/HUDBar.cc	(revision 11128)
+++ code/branches/ogre1.9/src/modules/overlays/hud/HUDBar.cc	(revision 11129)
@@ -32,9 +32,15 @@
 #include "HUDBar.h"
 
-#include <OgreOverlayManager.h>
 #include <OgreMaterialManager.h>
 #include <OgreTechnique.h>
 #include <OgrePass.h>
-#include <OgrePanelOverlayElement.h>
+
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlayManager.h>
+#   include <Overlay/OgrePanelOverlayElement.h>
+#else
+#   include <OgreOverlayManager.h>
+#   include <OgrePanelOverlayElement.h>
+#endif
 
 #include "util/Convert.h"
@@ -248,3 +254,13 @@
         return this->icon_->getMaterialName();
     }
+
+    void HUDBar::setIconPosition(Vector2 position)
+    {
+        this->icon_->setPosition(position.x, position.y);
+    }
+
+    void HUDBar::setIconDimensions(Vector2 dimensions)
+    {
+        this->icon_->setDimensions(dimensions.x, dimensions.y);
+    }
 }
Index: code/branches/ogre1.9/src/modules/overlays/hud/HUDBar.h
===================================================================
--- code/branches/ogre1.9/src/modules/overlays/hud/HUDBar.h	(revision 11128)
+++ code/branches/ogre1.9/src/modules/overlays/hud/HUDBar.h	(revision 11129)
@@ -37,5 +37,4 @@
 #include <map>
 #include <vector>
-#include <OgrePanelOverlayElement.h>
 
 #include "util/Math.h"
@@ -122,8 +121,6 @@
             { return this->currentColour_; }
 
-        inline void setIconPosition(Vector2 position)
-            { this->icon_->setPosition(position.x, position.y); }
-        inline void setIconDimensions(Vector2 dimensions)
-            { this->icon_->setDimensions(dimensions.x, dimensions.y); }
+        void setIconPosition(Vector2 position);
+        void setIconDimensions(Vector2 dimensions);
 
     protected:
Index: code/branches/ogre1.9/src/modules/overlays/hud/HUDNavigation.cc
===================================================================
--- code/branches/ogre1.9/src/modules/overlays/hud/HUDNavigation.cc	(revision 11128)
+++ code/branches/ogre1.9/src/modules/overlays/hud/HUDNavigation.cc	(revision 11129)
@@ -32,8 +32,16 @@
 
 #include <OgreCamera.h>
-#include <OgreFontManager.h>
-#include <OgreOverlayManager.h>
-#include <OgreTextAreaOverlayElement.h>
-#include <OgrePanelOverlayElement.h>
+
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreFontManager.h>
+#   include <Overlay/OgreOverlayManager.h>
+#   include <Overlay/OgreTextAreaOverlayElement.h>
+#   include <Overlay/OgrePanelOverlayElement.h>
+#else
+#   include <OgreFontManager.h>
+#   include <OgreOverlayManager.h>
+#   include <OgreTextAreaOverlayElement.h>
+#   include <OgrePanelOverlayElement.h>
+#endif
 
 #include <typeinfo>
Index: code/branches/ogre1.9/src/modules/overlays/hud/HUDRadar.cc
===================================================================
--- code/branches/ogre1.9/src/modules/overlays/hud/HUDRadar.cc	(revision 11128)
+++ code/branches/ogre1.9/src/modules/overlays/hud/HUDRadar.cc	(revision 11129)
@@ -31,6 +31,11 @@
 #include "HUDRadar.h"
 
-#include <OgreOverlayManager.h>
-#include <OgrePanelOverlayElement.h>
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlayManager.h>
+#   include <Overlay/OgrePanelOverlayElement.h>
+#else
+#   include <OgreOverlayManager.h>
+#   include <OgrePanelOverlayElement.h>
+#endif
 
 #include "util/Math.h"
Index: code/branches/ogre1.9/src/modules/overlays/hud/HUDWeapon.cc
===================================================================
--- code/branches/ogre1.9/src/modules/overlays/hud/HUDWeapon.cc	(revision 11128)
+++ code/branches/ogre1.9/src/modules/overlays/hud/HUDWeapon.cc	(revision 11129)
@@ -28,4 +28,12 @@
 
 #include "HUDWeapon.h"
+
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlayManager.h>
+#   include <Overlay/OgrePanelOverlayElement.h>
+#else
+#   include <OgreOverlayManager.h>
+#   include <OgrePanelOverlayElement.h>
+#endif
 
 #include "core/CoreIncludes.h"
Index: code/branches/ogre1.9/src/modules/overlays/hud/HUDWeapon.h
===================================================================
--- code/branches/ogre1.9/src/modules/overlays/hud/HUDWeapon.h	(revision 11128)
+++ code/branches/ogre1.9/src/modules/overlays/hud/HUDWeapon.h	(revision 11129)
@@ -35,7 +35,4 @@
 #include <vector>
 #include <string>
-
-#include <OgreOverlayManager.h>
-#include <OgrePanelOverlayElement.h> 
 
 #include "overlays/OrxonoxOverlay.h"
Index: code/branches/ogre1.9/src/modules/overlays/hud/HUDWeaponMode.cc
===================================================================
--- code/branches/ogre1.9/src/modules/overlays/hud/HUDWeaponMode.cc	(revision 11128)
+++ code/branches/ogre1.9/src/modules/overlays/hud/HUDWeaponMode.cc	(revision 11129)
@@ -28,4 +28,12 @@
 
 #include "HUDWeaponMode.h"
+
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlayManager.h>
+#   include <Overlay/OgrePanelOverlayElement.h>
+#else
+#   include <OgreOverlayManager.h>
+#   include <OgrePanelOverlayElement.h>
+#endif
 
 #include "util/Convert.h"
Index: code/branches/ogre1.9/src/modules/overlays/hud/HUDWeaponMode.h
===================================================================
--- code/branches/ogre1.9/src/modules/overlays/hud/HUDWeaponMode.h	(revision 11128)
+++ code/branches/ogre1.9/src/modules/overlays/hud/HUDWeaponMode.h	(revision 11129)
@@ -36,7 +36,4 @@
 #include <vector>
 #include <string>
-
-#include <OgreOverlayManager.h>
-#include <OgrePanelOverlayElement.h> 
 
 #include "overlays/OrxonoxOverlay.h"
Index: code/branches/ogre1.9/src/modules/overlays/stats/Stats.cc
===================================================================
--- code/branches/ogre1.9/src/modules/overlays/stats/Stats.cc	(revision 11128)
+++ code/branches/ogre1.9/src/modules/overlays/stats/Stats.cc	(revision 11129)
@@ -30,6 +30,12 @@
 
 #include <string>
-#include <OgreOverlayManager.h>
-#include <OgreBorderPanelOverlayElement.h>
+
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlayManager.h>
+#   include <Overlay/OgreBorderPanelOverlayElement.h>
+#else
+#   include <OgreOverlayManager.h>
+#   include <OgreBorderPanelOverlayElement.h>
+#endif
 
 #include "util/StringUtils.h"
Index: code/branches/ogre1.9/src/orxonox/RenderQueueListener.cc
===================================================================
--- code/branches/ogre1.9/src/orxonox/RenderQueueListener.cc	(revision 11128)
+++ code/branches/ogre1.9/src/orxonox/RenderQueueListener.cc	(revision 11129)
@@ -83,4 +83,7 @@
             renderSystem->setStencilBufferParams(Ogre::CMPF_ALWAYS_PASS,
                 STENCIL_VALUE_FOR_GLOW, STENCIL_FULL_MASK, 
+#if OGRE_VERSION >= 0x010900
+                STENCIL_FULL_MASK,
+#endif
                 Ogre::SOP_KEEP,Ogre::SOP_KEEP,Ogre::SOP_REPLACE,false);       
         } 
@@ -91,4 +94,7 @@
             renderSystem->setStencilBufferParams(Ogre::CMPF_NOT_EQUAL,
                 STENCIL_VALUE_FOR_GLOW, STENCIL_FULL_MASK, 
+#if OGRE_VERSION >= 0x010900
+                STENCIL_FULL_MASK,
+#endif
                 Ogre::SOP_KEEP,Ogre::SOP_KEEP,Ogre::SOP_REPLACE,false);       
         }
Index: code/branches/ogre1.9/src/orxonox/controllers/NewHumanController.cc
===================================================================
--- code/branches/ogre1.9/src/orxonox/controllers/NewHumanController.cc	(revision 11128)
+++ code/branches/ogre1.9/src/orxonox/controllers/NewHumanController.cc	(revision 11129)
@@ -397,5 +397,10 @@
                 try
                 {
-                    wePtr = orxonox_cast<WorldEntity*>(Ogre::any_cast<OrxonoxClass*>(itr->movable->getUserAny()));
+#if OGRE_VERSION >= 0x010900
+                    const Ogre::Any& any = itr->movable->getUserObjectBindings().getUserAny();
+#else
+                    const Ogre::Any& any = itr->movable->getUserAny();
+#endif
+                    wePtr = orxonox_cast<WorldEntity*>(Ogre::any_cast<OrxonoxClass*>(any));
                 }
                 catch (...)
Index: code/branches/ogre1.9/src/orxonox/graphics/Camera.cc
===================================================================
--- code/branches/ogre1.9/src/orxonox/graphics/Camera.cc	(revision 11128)
+++ code/branches/ogre1.9/src/orxonox/graphics/Camera.cc	(revision 11129)
@@ -62,5 +62,10 @@
 
         this->camera_ = this->getScene()->getSceneManager()->createCamera(getUniqueNumberString());
-        static_cast<Ogre::MovableObject*>(this->camera_)->setUserAny(Ogre::Any(static_cast<OrxonoxClass*>(this)));
+        Ogre::MovableObject* movable = static_cast<Ogre::MovableObject*>(this->camera_);
+#if OGRE_VERSION >= 0x010900
+        movable->getUserObjectBindings().setUserAny(Ogre::Any(static_cast<OrxonoxClass*>(this)));
+#else
+        movable->setUserAny(Ogre::Any(static_cast<OrxonoxClass*>(this)));
+#endif
         this->cameraNode_ = this->getScene()->getRootSceneNode()->createChildSceneNode();
         this->attachNode(this->cameraNode_);
Index: code/branches/ogre1.9/src/orxonox/graphics/Model.cc
===================================================================
--- code/branches/ogre1.9/src/orxonox/graphics/Model.cc	(revision 11128)
+++ code/branches/ogre1.9/src/orxonox/graphics/Model.cc	(revision 11129)
@@ -30,5 +30,10 @@
 
 #include <OgreEntity.h>
-#include <OgreProgressiveMesh.h>
+#if OGRE_VERSION >= 0x010900
+#   include <OgreProgressiveMeshGenerator.h>
+#   include <OgreDistanceLodStrategy.h>
+#else
+#   include <OgreProgressiveMesh.h>
+#endif
 
 #include "core/CoreIncludes.h"
@@ -196,19 +201,9 @@
             {
                 float volume = this->mesh_.getEntity()->getBoundingBox().volume();
-/*
-                float scaleFactor = 1;
-
-                BaseObject* creatorPtr = this;
-
-                while(creatorPtr!=nullptr&&orxonox_cast<WorldEntity*>(creatorPtr))
-                {
-                    scaleFactor *= getBiggestScale(((WorldEntity*) creatorPtr)->getScale3D());
-                    creatorPtr = creatorPtr->getCreator();
-                }
-                orxout() << "name: " << this->meshSrc_ << "scaleFactor: " << scaleFactor << ", volume: " << volume << endl;
-*/
                 orxout(verbose, context::lod) << "Setting lodLevel for " << this->meshSrc_<< " with lodLevel_: " << this->lodLevel_ <<" and volume: "<< volume << ":" << endl;
 
-#if OGRE_VERSION >= 0x010800
+#if OGRE_VERSION >= 0x010900
+                Ogre::LodConfig::LodLevelList distList;
+#elif OGRE_VERSION >= 0x010800
                 Ogre::ProgressiveMesh::LodValueList distList;
 #elif OGRE_VERSION >= 0x010700
@@ -220,19 +215,18 @@
                 if( lodLevel_>0 )
                 {
-//                    float factor = scaleFactor*5/lodLevel_;
                     float factor = pow(volume, 2.0f / 3.0f) * 15.0f / lodLevel_;
 
                     orxout(verbose, context::lod) << "LodLevel set with factor: " << factor << endl;
 
-                    distList.push_back(70.0f*factor);
-                    distList.push_back(140.0f*factor);
-                    distList.push_back(170.0f*factor);
-                    distList.push_back(200.0f*factor);
-                    distList.push_back(230.0f*factor);
-                    distList.push_back(250.0f*factor);
-                    distList.push_back(270.0f*factor);
-                    distList.push_back(290.0f*factor);
-                    distList.push_back(310.0f*factor);
-                    distList.push_back(330.0f*factor);
+                    addLodDistanceToList(distList, 70.0f*factor);
+                    addLodDistanceToList(distList, 140.0f*factor);
+                    addLodDistanceToList(distList, 170.0f*factor);
+                    addLodDistanceToList(distList, 200.0f*factor);
+                    addLodDistanceToList(distList, 230.0f*factor);
+                    addLodDistanceToList(distList, 250.0f*factor);
+                    addLodDistanceToList(distList, 270.0f*factor);
+                    addLodDistanceToList(distList, 290.0f*factor);
+                    addLodDistanceToList(distList, 310.0f*factor);
+                    addLodDistanceToList(distList, 330.0f*factor);
                     while(distList.size()>this->numLodLevels_)
                         distList.pop_back();
@@ -240,5 +234,13 @@
 
                     //Generiert LOD-Levels
-#if OGRE_VERSION >= 0x010800
+#if OGRE_VERSION >= 0x010900
+                    Ogre::LodConfig config;
+                    config.mesh = this->mesh_.getEntity()->getMesh();
+                    config.levels = distList;
+                    config.strategy = Ogre::DistanceLodSphereStrategy::getSingletonPtr();
+
+                    Ogre::ProgressiveMeshGenerator generator;
+                    generator.generateLodLevels(config);
+#elif OGRE_VERSION >= 0x010800
                     Ogre::ProgressiveMesh::generateLodLevels(this->mesh_.getEntity()->getMesh().get(), distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL,
                         this->lodReductionRate_);
@@ -263,3 +265,13 @@
 #endif
     }
+
+    template <class T>
+    void Model::addLodDistanceToList(T& list, float distance)
+    {
+#if OGRE_VERSION >= 0x010900
+        list.push_back({distance, Ogre::LodLevel::VRM_COLLAPSE_COST, this->lodReductionRate_, 0, false});
+#else
+        list.push_back(distance);
+#endif
+    }
 }
Index: code/branches/ogre1.9/src/orxonox/graphics/Model.h
===================================================================
--- code/branches/ogre1.9/src/orxonox/graphics/Model.h	(revision 11128)
+++ code/branches/ogre1.9/src/orxonox/graphics/Model.h	(revision 11129)
@@ -114,4 +114,7 @@
             void enableLod();
 
+            template <class T>
+            void addLodDistanceToList(T& list, float distance);
+
             inline void setLodLevel(float lodLevel)
                 { this->lodLevel_ =  lodLevel; }
Index: code/branches/ogre1.9/src/orxonox/overlays/InGameConsole.cc
===================================================================
--- code/branches/ogre1.9/src/orxonox/overlays/InGameConsole.cc	(revision 11128)
+++ code/branches/ogre1.9/src/orxonox/overlays/InGameConsole.cc	(revision 11129)
@@ -32,12 +32,24 @@
 #include <algorithm>
 #include <string>
-#include <OgreOverlay.h>
-#include <OgreOverlayElement.h>
-#include <OgreOverlayManager.h>
-#include <OgreOverlayContainer.h>
-#include <OgreBorderPanelOverlayElement.h>
-#include <OgreTextAreaOverlayElement.h>
-#include <OgreFontManager.h>
-#include <OgreFont.h>
+#include <OgrePrerequisites.h>
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlay.h>
+#   include <Overlay/OgreOverlayElement.h>
+#   include <Overlay/OgreOverlayManager.h>
+#   include <Overlay/OgreOverlayContainer.h>
+#   include <Overlay/OgreBorderPanelOverlayElement.h>
+#   include <Overlay/OgreTextAreaOverlayElement.h>
+#   include <Overlay/OgreFontManager.h>
+#   include <Overlay/OgreFont.h>
+#else
+#   include <OgreOverlay.h>
+#   include <OgreOverlayElement.h>
+#   include <OgreOverlayManager.h>
+#   include <OgreOverlayContainer.h>
+#   include <OgreBorderPanelOverlayElement.h>
+#   include <OgreTextAreaOverlayElement.h>
+#   include <OgreFontManager.h>
+#   include <OgreFont.h>
+#endif
 
 #include "util/Clock.h"
Index: code/branches/ogre1.9/src/orxonox/overlays/OrxonoxOverlay.cc
===================================================================
--- code/branches/ogre1.9/src/orxonox/overlays/OrxonoxOverlay.cc	(revision 11128)
+++ code/branches/ogre1.9/src/orxonox/overlays/OrxonoxOverlay.cc	(revision 11129)
@@ -35,7 +35,13 @@
 
 #include <cmath>
-#include <OgreOverlay.h>
-#include <OgreOverlayManager.h>
-#include <OgrePanelOverlayElement.h>
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlay.h>
+#   include <Overlay/OgreOverlayManager.h>
+#   include <Overlay/OgrePanelOverlayElement.h>
+#else
+#   include <OgreOverlay.h>
+#   include <OgreOverlayManager.h>
+#   include <OgrePanelOverlayElement.h>
+#endif
 #include <OgreRenderWindow.h>
 #include <OgreMaterialManager.h>
Index: code/branches/ogre1.9/src/orxonox/worldentities/WorldEntity.cc
===================================================================
--- code/branches/ogre1.9/src/orxonox/worldentities/WorldEntity.cc	(revision 11128)
+++ code/branches/ogre1.9/src/orxonox/worldentities/WorldEntity.cc	(revision 11129)
@@ -548,5 +548,9 @@
     {
         this->node_->attachObject(object);
+#if OGRE_VERSION >= 0x010900
+        object->getUserObjectBindings().setUserAny(Ogre::Any(static_cast<OrxonoxClass*>(this)));
+#else
         object->setUserAny(Ogre::Any(static_cast<OrxonoxClass*>(this)));
+#endif
     }
 
@@ -563,5 +567,9 @@
     void WorldEntity::detachOgreObject(Ogre::MovableObject* object)
     {
+#if OGRE_VERSION >= 0x010900
+        object->getUserObjectBindings().setUserAny(Ogre::Any(static_cast<OrxonoxClass*>(nullptr)));
+#else
         object->setUserAny(Ogre::Any(static_cast<OrxonoxClass*>(nullptr)));
+#endif
         this->node_->detachObject(object);
     }
