View Issue Details

IDProjectCategoryLast Update
0003620AI War 1 / ClassicGUIJul 6, 2011 4:07 pm
ReporterET3D Assigned ToChris_McElligottPark  
Status closedResolutionnot fixable 
Product Version5.011 
Summary0003620: In windowed mode, mouse pans even when outside the window and when window is inactive
DescriptionWhen "Mouse Pans View When At Screen Edge" is enabled and the game runs in windowed mode, then whenever the mouse is outside the game window the view pans depending on the mouse's location compared to the game window. This happens even when the game window isn't the active window.

I can see how it may be useful to pan when the mouse is slightly outside the window, as this means the mouse position doesn't have to be precise, but I think that:

- When the game window is inactive it shouldn't handle any controller I/O at all (including polling the mouse position).

- If the game pans when the mouse position is outside the window, it should stop once the mouse distance goes over a threshold, and that threshold should be controllable in the settings.
TagsNo tags attached.
Internal Weight

Activities

Chris_McElligottPark

Jul 6, 2011 9:33 am

administrator   ~0012664

Yes, we agree, that is how things should work -- and how they did work when we had our own custom windows engine. However, the Unity 3D engine doesn't yet work that way, and we can't do anything about it directly, unfortunately.

ET3D

Jul 6, 2011 10:58 am

reporter   ~0012665

Thanks for the quick response. Can't say I'm happy about this, but obviously we can only wait for Unity to fix this. Hopefully you've provided Unity with feedback on this.

Chris_McElligottPark

Jul 6, 2011 11:14 am

administrator   ~0012666

Yep -- they aren't too open about what they will or won't change in future versions, but we always are scouring their release notes for this plus a few other nits of a similar ilk.

ET3D

Jul 6, 2011 3:18 pm

reporter   ~0012668

Never used Unity, but I went to take a look at the docs. Is the problem clamping of Input.MousePosition? (Just wondering. I'm a programmer and was once a game developer.)

Chris_McElligottPark

Jul 6, 2011 3:24 pm

administrator   ~0012669

The problem is actually detecting if the window has focus or not. If we were to clamp input.mouseposition, then the windowed mode (and fullscreen on multimonitor systems) would feel really incredibly unresponsive. The problem is that we have no idea when the game is minimized, out of focus, or otherwise inactive. Unity provides for that solely with the option to halt all gameplay when the window loses input focus, but that causes multiplayer connections to fail and other general undesirable things even in solo (inability to play in windowed mode, for one).

ET3D

Jul 6, 2011 3:53 pm

reporter   ~0012670

But can you use input.mouseposition to detect if the mouse is outside the window? If you can tell how much outside the window the mouse is, then you could stop the scrolling at a certain distance (but keep a buffer zone, as I said earlier, so that scrolling doesn't have to happen at the very edge).

Chris_McElligottPark

Jul 6, 2011 4:07 pm

administrator   ~0012671

That doesn't really work, because people with various sensitivities of mice and different mouse movement habits can really go outside the buffer zone just during normal drag-selection or panning, for instance. You wind up with the game feeling glitchy and like it doesn't scroll properly (we've tried things of this nature).

Issue History

Date Modified Username Field Change
Jul 6, 2011 9:32 am ET3D New Issue
Jul 6, 2011 9:33 am Chris_McElligottPark Note Added: 0012664
Jul 6, 2011 9:33 am Chris_McElligottPark Status new => closed
Jul 6, 2011 9:33 am Chris_McElligottPark Assigned To => Chris_McElligottPark
Jul 6, 2011 9:33 am Chris_McElligottPark Resolution open => not fixable
Jul 6, 2011 10:58 am ET3D Note Added: 0012665
Jul 6, 2011 11:14 am Chris_McElligottPark Note Added: 0012666
Jul 6, 2011 3:18 pm ET3D Note Added: 0012668
Jul 6, 2011 3:24 pm Chris_McElligottPark Note Added: 0012669
Jul 6, 2011 3:53 pm ET3D Note Added: 0012670
Jul 6, 2011 4:07 pm Chris_McElligottPark Note Added: 0012671
Apr 14, 2014 9:28 am Chris_McElligottPark Category Bug - UI => GUI