I want to be able to move mouse outside of game window

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

How much do you hate this problem?

I find it unbelievably irritating and hope it will be solved soon
4
67%
It is a bit irritating at times but doesn't bother me that much
0
No votes
I enjoy that feature(if so please list your reasons why and what mental institution you are currently held up in)
2
33%
 
Total votes: 6

Wolf Dreamer
Posts: 121
Joined: Tue Feb 10, 2004 6:39 am
Location: the land of chaotic dreams
Contact:

I want to be able to move mouse outside of game window

Post by Wolf Dreamer »

I'm sure a lot of people would like to see this.

Have it where I can move the mouse cursor out of the window the game is running in.

It seems like a simple enough thing to ask for. Surely someone knows how to do that.
The last sane human being in a world gone mad

http://s8.invisionfree.com/Game_Maker_f ... hp?act=idx
Nessie
Posts: 14
Joined: Thu Apr 08, 2004 4:27 pm
Location: Madison, WI, USA

Post by Nessie »

Last I knew, not every IrrLicht demo does that.

Anyway, if you are talking about the FPS style demos, capturing the mouse and resetting the position to the center of the game window is a common feature in any FPS engine.

So, I'd imagine all you have to do is disable that feature, say like in Quake, when you open up a console in your game or just generally when you press some key you define to release the mouse. (maybe try irr::gui::ICursorControl::setPosition...)
"Build a man a fire and he'll be warm for the evening. Set a man on fire and he'll be warm for the rest of his life." -unknown
Wolf Dreamer
Posts: 121
Joined: Tue Feb 10, 2004 6:39 am
Location: the land of chaotic dreams
Contact:

Post by Wolf Dreamer »

Hitting Ctrl Esc usually get someone out of a window. I guess I could make it so that it detects that and toggles that feature off, then back on again when you click inside the window.

Or just have a command to toggle that on and off as needed.

Doh! Must learn to think things through before posting. Going back to the little padded white room now...
The last sane human being in a world gone mad

http://s8.invisionfree.com/Game_Maker_f ... hp?act=idx
Mercior
Posts: 100
Joined: Tue Feb 24, 2004 1:53 am
Location: UK
Contact:

Post by Mercior »

Irrlicht doesn't do this!

It will only capture the mouse when you insert a FPS camera because this camera has to keep the cursor centered and then calculates rotation based on how far you've moved the mouse.

If you want to have a FPS camera but toggle the input off, use camera->setInputReceiverEnabled(false);
Lode

Post by Lode »

That also disables keyboard input.
Isn't there any easy way to release just the mouse? (maybe in some future version? ;)

This would be useful if you want to allow the user to manipulate hud items and move at the same time, for example in a rpg game one could prepare a spell using mouse while at the same time running like mad (away from those nasty monsters for whom the spell is being soon served.)

Sorry for my incoherent text, I just woke up.
Post Reply