Code: Select all
ISceneManager *sceneMgr = mDevice->getSceneManager();
ICameraSceneNode *cam = sceneMgr->addCameraSceneNode(NULL, irr::core::vector3df(0, 0, -100),
irr::core::vector3df(0, 0, 0), 1);
irr::core::matrix4 orthoMatrix;
orthoMatrix.buildProjectionMatrixOrthoLH(1024, 768, -100, 200);
cam->setProjectionMatrix(orthoMatrix);
cam->setIsOrthogonal(true);
Code: Select all
ICameraSceneNode *cam = mDevice->getSceneManager()->getActiveCamera();
const scene::SViewFrustum* f = cam->getViewFrustum();
core::vector3df farLeftUp = f->getFarLeftUp();
core::vector3df lefttoright = f->getFarRightUp() - farLeftUp;
core::vector3df uptodown = f->getFarLeftDown() - farLeftUp;
So my question is this: What is it that is done to this camera between my initializing code at the top, and after the first frame is rendered? Once I know that, in theory, I could come up with a way to force the camera to update that immediately after my initialization so I can get correct collision detection BEFORE the first frame is rendered.
