diff --git a/apps/openmw/mwrender/playerpos.hpp b/apps/openmw/mwrender/playerpos.hpp index 7a1f571ce..7c66c8b4c 100644 --- a/apps/openmw/mwrender/playerpos.hpp +++ b/apps/openmw/mwrender/playerpos.hpp @@ -37,9 +37,9 @@ namespace MWRender if (updateCamera) camera->setPosition (Ogre::Vector3 ( mPlayer.ref.pos.pos[0], - -mPlayer.ref.pos.pos[2], - mPlayer.ref.pos.pos[1])); - + mPlayer.ref.pos.pos[2], + -mPlayer.ref.pos.pos[1])); +std::cout<<"camera: "<getPosition()<getPosition(); relX = pos[0]; - relY = -pos[2]; - relZ = pos[1]; + relY = pos[2]; + relZ = -pos[1]; // TODO: Collision detection must be used to find the REAL new // position. diff --git a/apps/openmw/mwscript/cellextensions.cpp b/apps/openmw/mwscript/cellextensions.cpp index 6171a82d9..27251a728 100644 --- a/apps/openmw/mwscript/cellextensions.cpp +++ b/apps/openmw/mwscript/cellextensions.cpp @@ -65,8 +65,8 @@ namespace MWScript const int cellSize = 8192; ESM::Position pos; - pos.pos[0] = cellSize * x; - pos.pos[1] = cellSize * y; + pos.pos[0] = cellSize * (x+0.5); + pos.pos[1] = cellSize * (y+0.5); pos.pos[2] = 0; pos.rot[0] = pos.rot[1] = pos.rot[2] = 0; context.getWorld().changeToExteriorCell (pos);