Hi,
I'm not sure if this is intended to be like it is, though...
I tested this with the special fx demo (#08 )...
when you create an app in windowed mode and using a fps camera, then if you move the mouse fastly sideways (look around) so the mouse gets out of the window the movement (rotation of the cam) stops and the mouse curser stays outside the window until you move it back over the app's window...
I think this is a bug, because you can't play a game in windowed mode where you have to turn around fast...
let's say an enemy stands behind you and you want to turn around to shoot him, then you can't do this fast, because the mouse gets out of the window and you don't rotate anymore until you move the mouse back over the window...
FPS camera and windowed mode
FPS camera and windowed mode
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
what a question is this ?!?!?hybrid wrote:Why would you use windowed mode then
why should I not use windowed mode, or at least let the user decide to use fullscreen or windowed ???
no, the focus always stays on the app's window and I also don't press any mouse buttons to change the focus...hybrid wrote:Also, might be a problem with your Desktop setup, maybe your window manager grabs the focus?
maybe someone can test this with the examples from the sdk where a fps camera is used (02.Quake3Map, 07.Collision, 08.SpecialFX, ...) ???
start them (they are in windowed mode by default) and move the mouse fast sideways...
I think it's easiest to see with 08.SpecialFX with realtime shadows, because it's more hardware challenging and the mouse updates not as often as (e.g.) with the 02.Quake3Map example...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Yup, that looks like a bug. It's escaping completely on Windows, and on Ubuntu 8.10 (in VmWare) it temporarily escapes but then gets recaptured again. I'll look into it... wait for it... waaaait... now.
Hah, got it. A very quick movement can take the cursor out of the window in a single tick. We then don't get any more mouse events for it, but we still think that it's at the window centre, and so never set it back there.
I've made the position setting unconditional in CSceneNodeAnimatorCameraFPS::animateNode(), so that we always grab the pointer back again.
This does mean that if you do smgr->drawAll() without checking device->isWindowActive() then the cursor will always be moved back even when you switch windows (e.g. to a debugger). However, it's the most robust solution. I tried registering for WM_MOUSELEAVE messages on Windows, which did help, but was still able to escape the logic and lose the pointer with very frenetic movements. If anyone can get that working robustly, knock yourself out.
1.5 branch : SVN 1965
Trunk : SVN 1966.
Hah, got it. A very quick movement can take the cursor out of the window in a single tick. We then don't get any more mouse events for it, but we still think that it's at the window centre, and so never set it back there.
I've made the position setting unconditional in CSceneNodeAnimatorCameraFPS::animateNode(), so that we always grab the pointer back again.
This does mean that if you do smgr->drawAll() without checking device->isWindowActive() then the cursor will always be moved back even when you switch windows (e.g. to a debugger). However, it's the most robust solution. I tried registering for WM_MOUSELEAVE messages on Windows, which did help, but was still able to escape the logic and lose the pointer with very frenetic movements. If anyone can get that working robustly, knock yourself out.
1.5 branch : SVN 1965
Trunk : SVN 1966.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way