A surprisingly n00b question about the FPS camera

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
MKiG
Posts: 9
Joined: Sun Oct 29, 2006 3:55 pm

A surprisingly n00b question about the FPS camera

Post by MKiG »

Hi everyone, i need your help with the FPS camera (and here comes the n00b bit) but i cant get it to freeze.

No matter now many times i type in camera->setInputReceiverEnabled(false); the game just continues to keep working.

I really need to pause it or my menu will be completely useless.
Image
AaronA
Posts: 55
Joined: Tue Sep 12, 2006 1:31 am

Post by AaronA »

Its because the FPS camera uses non-event receiver input. Check the ICameraSceneNode reference in the documentation, you should find something to flush the controls of the FPS camera.

Edit: Actually I couldn't find anything that would work. Perhaps its best to just use addCameraSceneNode instead of addCameraSceneNodeFPS. Or alternativly, you could just use...

Code: Select all

//psuedo code
// bassicaly just set the position to the last position if the menu
// is enabled and the player pressed a move button.
if (menuIsEnabled) {
    if (userMovedCamera) {
        setCameraPosition(vector3d(lastPosition));
    }
}
There might be some unwanted choppyness though. Another way would be to just leave it like you have (game still runs in background), only if you can though, think something kinda' like Resident Evil: Outbreak.
Post Reply