PatHightree / SpaceNavigator

SpaceNavigator driver for Unity3D
MIT License
170 stars 55 forks source link

Scene View camera receives small input values even when editor is not focussed #29

Closed hybridherbst closed 1 year ago

hybridherbst commented 3 years ago

Describe the bug When focussing away from the editor, the scene view moves ever so slightly, to the point that when focussing the editor again after ~30 minutes the camera is somewhere totally else. While I generally like that functionality (using the space mouse while editor is in the background) it should be optional, and I think the slow "drift" is a bug nonetheless.

To Reproduce Steps to reproduce the behavior:

  1. install package
  2. click into scene view
  3. focus another window
  4. note that scene view moves slightly
  5. wait for 30 min
  6. focus Unity
  7. note that scene view has wandered off

Expected behavior

  1. no wandering off
  2. moving the scene view camera when Unity is not focussed should be optional (and off by default)

Desktop (please complete the following information):

PatHightree commented 3 years ago

Thanks for the report, I've seen some drift now and then. Good to know it builds up over time

PatHightree commented 2 years ago

Unmistakably seeing this issue now on U2021.2.0b3, never saw it like this on U2020.3.3f1 and earlier. What Unity version did you see it on ?

hybridherbst commented 2 years ago

It's also there on 2020.3, but much slower; in 2021.2 the degradation is pretty rapid.

bikusta commented 2 years ago

Hi. I can confirm the issue. Just installed driver version 2.0.0-beta.7 from Git in Unity 2020.3.25f on Windows 10. The scene view is moving constantly, when focused or not.

Video showing the movement: https://youtu.be/J_x5xuZRAW8

mkoehmst commented 2 years ago

Could the problem be the lack of a deadzone? Maybe previous version were doing some kind of automatic smoothing that would zero out very small translations. A deadzone customization in the SpaceNavigator options window could be useful for this. I'm experiencing constant drift as well with a SpaceNavigator.

fpga68k commented 2 years ago

I also noticed the missing (re-)calibration and that there is no sufficient dead zone. The fix from @bikusta works well for the dead zone. Thanks!

PatHightree commented 1 year ago

Thanks @bikusta for the fix, I merged it into /main. I changed the epsilon settings to deadzone sliders for clarity.