Commit 697c791c authored by Damien Lawford's avatar Damien Lawford

New field Projection

Projection adjusted so field fits nicely on screen
parent 56a1adc3
......@@ -1556,7 +1556,7 @@ void ClientField::GetHoverField(int x, int y) {
hovered_sequence = hc - 1 - (x - 501) * (hc - 1) / 247;
}
} else {
double screenx = x / 1024.0 * 1.25 - 0.81;
double screenx = x / 1024.0 * 1.35 - 0.90;
double screeny = y / 640.0 * 0.84 - 0.42;
double angle = 0.798056 - atan(screeny); //0.798056 = arctan(8.0/7.8)
double vlen = sqrt(1.0 + screeny * screeny);
......
......@@ -497,7 +497,7 @@ void Game::MainLoop() {
wchar_t cap[256];
camera = smgr->addCameraSceneNode(0);
irr::core::matrix4 mProjection;
BuildProjectionMatrix(mProjection, -0.81f, 0.44f, -0.42f, 0.42f, 1.0f, 100.0f);
BuildProjectionMatrix(mProjection, -0.90f, 0.45f, -0.42f, 0.42f, 1.0f, 100.0f);
camera->setProjectionMatrix(mProjection);
mProjection.buildCameraLookAtMatrixLH(vector3df(4.2f, 8.0f, 7.8f), vector3df(4.2f, 0, 0), vector3df(0, 0, 1));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment