i've written a game with a main menu and the game itself.
for the first time i click on "new game" everything works fine, but when i return to the menu and click again on "new game" the camera isn't moveable anymore ...
so, here's the code of the camera:
initialization:
Code: Select all
irr::scene::ICameraSceneNode* camera;
Code: Select all
camera = NULL;
camera = smgr->addCameraSceneNodeFPS(0,100.0f,500.0f);
camera->setFarValue(100000.0f);
camera->setPosition(core::vector3df(0,100,0));
Code: Select all
camera->grab();
camera->remove();
any idea why this happens?