Here are declarations:
Code: Select all
bool varMove=true;
int varRotate=0;
Code: Select all
bool OnEvent(SEvent event){
if (event.EventType == EET_KEY_INPUT_EVENT && !event.KeyInput.PressedDown){
switch(event.KeyInput.Key){
case KEY_ESCAPE:
{
varMove = false;
return true;
}break;
}
}
return false;
}
Code: Select all
scene::ICameraSceneNode *camera = smgr->addCameraSceneNode(0, core::vector3df(0,0,0), core::vector3df(0,0,0));
driver->beginScene(true, true, video::SColor(0,200,200,200));
smgr->drawAll();
if (varMove==false){ //varMove isn't changing on escape press. Why?
varRotate+=1;
}
camera->setPosition(core::vector3df(varRotate,50,50));
driver->endScene();