Default Z value to 0 and reverse the value, so positive Z is closer to the viewer

This commit is contained in:
Joshua Granick
2014-03-14 02:27:40 -07:00
parent abd8f15d1c
commit 8f7cb17eb6
2 changed files with 3 additions and 4 deletions

View File

@@ -30,8 +30,7 @@ DisplayObject::DisplayObject(bool inInitRef) : Object(inInitRef)
mParent = 0;
mGfx = 0;
mDirtyFlags = 0;
x = y = 0;
z = 0.1;
x = y = z = 0;
scaleX = scaleY = 1.0;
rotation = 0;
visible = true;

View File

@@ -272,7 +272,7 @@ void OpenGLS3D::FocusEye (Trans4x4 &outTrans) {
outTrans[0][0] = (a*n);
outTrans[0][1] = (b*n);
outTrans[0][2] = m;
outTrans[0][3] = (n*tx + m*tz);
outTrans[0][3] = (n*tx + m*-tz);
outTrans[1][0] = c;
outTrans[1][1] = d;
@@ -282,7 +282,7 @@ void OpenGLS3D::FocusEye (Trans4x4 &outTrans) {
outTrans[2][0] = -a*m;
outTrans[2][1] = -b*m;
outTrans[2][2] = -n;
outTrans[2][3] = -(n*tz-m*tx);
outTrans[2][3] = -(n*-tz-m*tx);
}
}