mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-01 01:36:44 +00:00
another coordinate system fix; still not working properly
This commit is contained in:
parent
1f077a5d5f
commit
c6f4bcbf68
2 changed files with 7 additions and 7 deletions
|
@ -37,9 +37,9 @@ namespace MWRender
|
||||||
if (updateCamera)
|
if (updateCamera)
|
||||||
camera->setPosition (Ogre::Vector3 (
|
camera->setPosition (Ogre::Vector3 (
|
||||||
mPlayer.ref.pos.pos[0],
|
mPlayer.ref.pos.pos[0],
|
||||||
-mPlayer.ref.pos.pos[2],
|
mPlayer.ref.pos.pos[2],
|
||||||
mPlayer.ref.pos.pos[1]));
|
-mPlayer.ref.pos.pos[1]));
|
||||||
|
std::cout<<"camera: "<<camera->getPosition()<<std::endl;
|
||||||
// TODO: Update sound listener
|
// TODO: Update sound listener
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,8 +65,8 @@ namespace MWRender
|
||||||
// Get new camera position, converting back to MW coords.
|
// Get new camera position, converting back to MW coords.
|
||||||
Vector3 pos = camera->getPosition();
|
Vector3 pos = camera->getPosition();
|
||||||
relX = pos[0];
|
relX = pos[0];
|
||||||
relY = -pos[2];
|
relY = pos[2];
|
||||||
relZ = pos[1];
|
relZ = -pos[1];
|
||||||
|
|
||||||
// TODO: Collision detection must be used to find the REAL new
|
// TODO: Collision detection must be used to find the REAL new
|
||||||
// position.
|
// position.
|
||||||
|
|
|
@ -65,8 +65,8 @@ namespace MWScript
|
||||||
const int cellSize = 8192;
|
const int cellSize = 8192;
|
||||||
|
|
||||||
ESM::Position pos;
|
ESM::Position pos;
|
||||||
pos.pos[0] = cellSize * x;
|
pos.pos[0] = cellSize * (x+0.5);
|
||||||
pos.pos[1] = cellSize * y;
|
pos.pos[1] = cellSize * (y+0.5);
|
||||||
pos.pos[2] = 0;
|
pos.pos[2] = 0;
|
||||||
pos.rot[0] = pos.rot[1] = pos.rot[2] = 0;
|
pos.rot[0] = pos.rot[1] = pos.rot[2] = 0;
|
||||||
context.getWorld().changeToExteriorCell (pos);
|
context.getWorld().changeToExteriorCell (pos);
|
||||||
|
|
Loading…
Reference in a new issue