[SOLVED] Relenquish FPS Camera's hold on mouse movements?

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
Spinland
Posts: 32
Joined: Fri May 14, 2010 1:06 pm
Location: Upstate NY, USA

[SOLVED] Relenquish FPS Camera's hold on mouse movements?

Post by Spinland »

I'm using a modified FPS Camera to move around and examine meshes of interest in the Irrlicht environment. I've noted that while the app is running the mouse is completely bound to the camera aiming function; even when I control-tab away from the app the mouse cursor won't leave the boundaries of the game engine window.

I'd like to define a key command that disables the camera input somehow, so the user can use the mouse normally as though the app weren't running, then be able to return to focus on the app and resume the mouse's connection to the camera. I'm at a loss what method to use in order to accomplish this. Is there something as simple as a way to set the active camera to null and then reinstate it? Does this require something more drastic, like de-activating the whole window?

Some advice and/or pointers to the appropriate methods would be greatly appreciated.

Many thanks in advance!
Last edited by Spinland on Wed Jul 21, 2010 2:57 pm, edited 1 time in total.
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

you can create another non-fps-camera and switch between them... :lol:

but easiest would be to call setInputReceiverEnabled(true/false) on the camera... ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Spinland
Posts: 32
Joined: Fri May 14, 2010 1:06 pm
Location: Upstate NY, USA

Post by Spinland »

Thanks! I actually just came back here to report that I'd successfully added a "vanilla" camera and a key command to swap between them and that works perfectly. When it's swapped out the view stays where it was and all does just as I wanted. Yay!

Then I see your much simpler solution and I'm all :oops:

Many thanks again! 8)
Post Reply