Search Unity

SpaceNavigator driver [OpenSource]

Discussion in 'Assets and Asset Store' started by PatHightree, May 15, 2013.

  1. PatHightree

    PatHightree

    Joined:
    Aug 18, 2009
    Posts:
    297
    cecarlsen likes this.
  2. ealbuquerque

    ealbuquerque

    Joined:
    Jan 18, 2017
    Posts:
    7
    Thanks @PatHightree!
    I will check your research. If I have any update or progress, I'll share it here.
     
  3. Innovine

    Innovine

    Joined:
    Aug 6, 2017
    Posts:
    522
    Thanks a lot for this asset, it is wonderful!

    I do notice however that the settings revert from Miniscule to Human very frequently... is this a known issue?
     
  4. unityafise

    unityafise

    Joined:
    Mar 3, 2020
    Posts:
    2
    Previously i was using unity 5.6.1 for my project. Recently i upgraded my project to unity 2019.3.0.
    Everything works fine in Editor and Standalone Windows build in unity 5.6.1. In unity 2019.3.0 the SDK available on Asset Store works fine in Editor but not working in Standalone Windows build. SDK has been re-imported but it is still not working. I am using Windows 10.
     
    CloudyVR likes this.
  5. stevensen

    stevensen

    Joined:
    Oct 31, 2013
    Posts:
    7
    Have the same problem, it isn't working with 2018.3.7 and newer.
    Another question is. How can I check if the spacenavigator is NULL, if the driver is not installed?
     
    CloudyVR likes this.
  6. cecarlsen

    cecarlsen

    Joined:
    Jun 30, 2006
    Posts:
    862
  7. tufeixp

    tufeixp

    Joined:
    Sep 6, 2015
    Posts:
    22
    I have tested the new input system, it can support 3dconnexion devices!
     
  8. PatHightree

    PatHightree

    Joined:
    Aug 18, 2009
    Posts:
    297
    Really ? That could simplify a lot of things.
    Care to share any sample code ?
     
  9. tufeixp

    tufeixp

    Joined:
    Sep 6, 2015
    Posts:
    22
    upload_2020-3-22_16-33-35.png
    It works for il2cpp release on windows too!
    Although I failed to use some vector3 to wrap up those individual axis float, it just woks.
     
    cecarlsen likes this.
  10. E-nd-E-Entertainment

    E-nd-E-Entertainment

    Joined:
    Dec 9, 2019
    Posts:
    1
    Just want to report that in my initial quick testing on macOS 11 Big Sur Beta, 3Dconnexion hasn't yet updated their 3Dware macOS drivers yet, so don't try to install the current driver release (3DxWare 10.6.5), as it caused my macOS 11 Beta test Mac (2013 Cylinder Mac Pro) to not be able to finish booting. I had to go into Safe Mode to remove the driver
     
  11. ivancole_unity

    ivancole_unity

    Joined:
    Jun 25, 2020
    Posts:
    1
    When I try to run with the latest Unity editor (2019.4.0f1) I get the following error and SpaceNavigator does not seem to work. Assets\SpaceNavigator\Editor\ViewportController.cs(31,4): warning CS0618: 'EditorApplication.playmodeStateChanged' is obsolete: 'Use EditorApplication.playModeStateChanged and/or EditorApplication.pauseStateChanged'

    Can you get us an update that will work with this latest version? Thank you Ivan
     
  12. PatHightree

    PatHightree

    Joined:
    Aug 18, 2009
    Posts:
    297
    I can't publish new versions to the asset store without a whole lot of hassle, sorry.
    Get the latest version from github, Dino Scheidt fixed this issue :)
     
    CloudyVR likes this.
  13. GallopingGames

    GallopingGames

    Joined:
    Mar 13, 2013
    Posts:
    26
    Hi @PatHightree thanks for your work with this amazing plugin! I'm currently working on a demo to show Autodesk Fusion 360 and 3Dconnexion how their implementation could work better (Fusion 360 has major issues with SpaceMouse). I have a great solution working in the editor, but when I publish Build and Run for Windows Standalone, the SpaceMouse does not work. Do I need to do something to make the package publish with the standalone? Many thanks.
     
  14. PatHightree

    PatHightree

    Joined:
    Aug 18, 2009
    Posts:
    297
  15. GallopingGames

    GallopingGames

    Joined:
    Mar 13, 2013
    Posts:
    26
    This fixed it, thanks so much for fast response!

    I've got a dreamy CAD orbit control system working in Unity using your plugin. Soooo smooth, no gimble lock, no camera side tilt (Horizon Lock on).

    One thing I noticed, sometimes using SpaceNavigator.Rotation.eulerAngles.x easing tilt back a fraction on the SpaceMouse (giving readings of -0.005f etc.) Sometimes jumps to 359.005 or thereabouts causing a wild glitch. I swapped to using SpaceNavigator.Rotation.x and scaling up, and it works perfectly! Now I just need to persuade someone at 3Dconnexion to look at the video or try the demo. Do you have any contacts at 3Dconnexion?
     
  16. PatHightree

    PatHightree

    Joined:
    Aug 18, 2009
    Posts:
    297
    Great to hear it solved your problem.
    I'm not in close contact with 3dconnexion, their sdk isn't much use to me because their architecture is aimed at developers who have access to the application's source code and that's not the case with me and Unity...
    They did sent me a spacemouse once :D
    All in all this project needs a reboot, but to be honest it's not high on my todo list.
     
  17. GallopingGames

    GallopingGames

    Joined:
    Mar 13, 2013
    Posts:
    26
    Well, I found it very easy to use your plugin, (got my demo working in a day) and it must have taken a huge amount of time and effort to publish. I'm very grateful!
    I got a genuine Nerdgasm interacting with the SpaceMouse with my own Unity code. Having worked out a good orbit system myself, I'm in a great position to try to bludgeon 3Dconnexion into fixing the Fusion 360 problems.

    Can you believe the Free Demo that comes with the SpaceMouse has Horizon Lock, but the feature is REMOVED from the settings when using the device in Fusion 360!? They also have a bug where they rotate the camera relative to itself rather than world space, meaning orbiting horizontally around the object tilts the camera like tilting your head to one side. This causes the user to constantly fight which way is up! So frustrated, and so are many on the Fusion 360 forums. :-D

    Thanks again.
     
    schmosef likes this.
  18. PatHightree

    PatHightree

    Joined:
    Aug 18, 2009
    Posts:
    297
    Good luck with the bludgeoning !
     
    schmosef likes this.
  19. GallopingGames

    GallopingGames

    Joined:
    Mar 13, 2013
    Posts:
    26
    Check this video out with sound if you can... makes me cry this is necessary. Made with your groovy plugin!
    https://autode.sk/2PROgQz
     
  20. PatHightree

    PatHightree

    Joined:
    Aug 18, 2009
    Posts:
    297
    My, my, that's some quality bludgeoning going on there :)
    Well done, best feature request I've seen in ages !
     
  21. mjlgardner1

    mjlgardner1

    Joined:
    Oct 11, 2014
    Posts:
    1
    For me, Rotation doesn't seem to work at all in 'Fly' Mode, but works in 'Orbit' mode. I've check all the settings in both the Space Navigator driver and the Unity package and it seems to be set up fine. Anyone else have this problem? I'm running Unity 2019.3.6f1
     
  22. PatHightree

    PatHightree

    Joined:
    Aug 18, 2009
    Posts:
    297
    Looking at the Input System now and I am getting good rotation data, but my translation X and Y are single bit values.
    Dit you see this too and found a workaround ?
    Or maybe the difference is in that we use different hardware ?



    @mjlgardner1 Don't know what could cause that, haven't seen it before
     
    Last edited: Aug 19, 2020
  23. PatHightree

    PatHightree

    Joined:
    Aug 18, 2009
    Posts:
    297
  24. Tongpan2020

    Tongpan2020

    Joined:
    Nov 4, 2020
    Posts:
    2
    Hi PatHightree

    Your space navigator driver runs well in game tab, but it crush in built application. The error is
    "NotSupportedException: Specified method is not supported.
    at (wrapper cominterop) TDx.TDxInput.DeviceClass..ctor()"

    I saw some threads mentioned this problem. But I can't find a solution. I tested the version 1.5.3. It doesn't fix the problem.

    Can you tell me how to fix this issue?

    Thanks
     
  25. PatHightree

    PatHightree

    Joined:
    Aug 18, 2009
    Posts:
    297
    No sorry, I don't have a solution for you.
    Unfortunately I don't have the spare time/energy to support this project at the moment.
    Your best chance is to experiment with the new input system, see if you can get it to play nice with your device.
    Please post here if you have succes.
     
  26. seap

    seap

    Joined:
    Dec 10, 2020
    Posts:
    1
    I'm having a problem in unity where it intermittently wont let me rotate. I can zoom and pan around though. I tested my spacemouse in fusion and the setup utility and it works. Any ideas?
     
  27. PatHightree

    PatHightree

    Joined:
    Aug 18, 2009
    Posts:
    297
    I would add logging or set tracepoints and try to find out where the problem originates.
     
  28. AbradolfLinkler

    AbradolfLinkler

    Joined:
    Feb 26, 2017
    Posts:
    26
    Hello,

    Thank You for writing this great plugin.

    I have a Space Navigator Compact, running on Unity 2020.1.17f1, and Mac OS Big Sur 11.0.1

    I have two problems - maybe You could kindly point me in the right direction:

    - the space navigator operates normally in EDIT mode, but then I enter PLAY MODE it stops working. Moreover - it stops working after the first entering into PLAY MODE entirely. I have to restart unity just to make it work in EDIT MODE again. It does not matter whether I set the project to use .NET 4.x or .NET Standard 2.0 - the problem stays the same.

    I have no other plugins installed - and also no errors in the Console....

    Could this be a matter of Big Sur incompatibility?

    Kind Regards!
     
  29. AbradolfLinkler

    AbradolfLinkler

    Joined:
    Feb 26, 2017
    Posts:
    26
    UPDATE:
    I do get two errors in the console:
    Assets/SpaceNavigator/Editor/ViewportController.cs(31,4): warning CS0618: 'EditorApplication.playmodeStateChanged' is obsolete: 'Use EditorApplication.playModeStateChanged and/or EditorApplication.pauseStateChanged'


    and

    Component GUI Layer in Camera for Scene Assets/SpaceNavigator/Runtime samples/- Fly around/Fly around.unity is no longer available.
    It will be removed after you edit this GameObject and save the Scene.
     
  30. RedHatJef

    RedHatJef

    Joined:
    Jun 11, 2019
    Posts:
    4
    Saw lots of little issues with this driver, but I wanted to try it anyway.
    • I'm using Unity 2019.4.12f1
    • I'm on Big Sur, and installed the latest 3dConnexion Big Sur Beta drivers.
    • I was unable to download the unity package (gave me a 401 error in the package manager)
    • I downloaded the source code from github and then dropped it into my unity project.
    • Restarted unity.
    • Window menu then contained the SpaceNavigator menu, and I was able to fly around my scene in the editor.
    Works fantastically. Thanks @PatHightree !!!
     
  31. lehrkommando

    lehrkommando

    Joined:
    Apr 2, 2021
    Posts:
    2
    Hello, Thank you for making this asset.

    I'm working with a non-SpaceMouse user through Unity Collaboration. Because of the collaboration feature, SpaceNavigator was inevitably uploaded to the collaboration server, but those who do not have SpaceMouse say that an error occurs in the editor and is inconvenient. Can this asset be disabled separately for each user for those who do not have a device?

    Below is the error history.


    System.Runtime.InteropServices.COMException (0x80040154):

    at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR (System.Int32 errorCode) [0x0000a] in <eae584ce26bc40229c1b1aa476bfa589>:0
    at System.__ComObject.CreateIUnknown (System.Type t) [0x00058] in <eae584ce26bc40229c1b1aa476bfa589>:0
    at Mono.Interop.ComInteropProxy.CreateProxy (System.Type t) [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0
    at System.Runtime.Remoting.RemotingServices.CreateClientProxyForComInterop (System.Type type) [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0
    at System.Runtime.Remoting.Activation.ActivationServices.CreateProxyForType (System.Type type) [0x0003b] in <eae584ce26bc40229c1b1aa476bfa589>:0
    at (wrapper managed-to-native) System.Object.__icall_wrapper_ves_icall_object_new_specific(intptr)
    at SpaceNavigatorDriver.SpaceNavigatorWindows..ctor () [0x00017] in C:\UnityProject\WarshipFleetCommand\Renewal\19.4.26f1\WarshipFleet_v2.0_URP_2019_26\Assets\SpaceNavigator\Plugins\SpaceNavigatorWindows.cs:48
    UnityEngine.Debug:LogError (object)
    SpaceNavigatorDriver.SpaceNavigatorWindows:.ctor () (at Assets/SpaceNavigator/Plugins/SpaceNavigatorWindows.cs:56)
    SpaceNavigatorDriver.SpaceNavigatorWindows:get_SubInstance () (at Assets/SpaceNavigator/Plugins/SpaceNavigatorWindows.cs:61)
    SpaceNavigatorDriver.SpaceNavigator:get_Instance () (at Assets/SpaceNavigator/Plugins/SpaceNavigator.cs:37)
    SpaceNavigatorDriver.SpaceNavigator:get_Translation () (at Assets/SpaceNavigator/Plugins/SpaceNavigator.cs:13)
    SpaceNavigatorDriver.ViewportController:Update () (at Assets/SpaceNavigator/Editor/ViewportController.cs:72)
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
     
  32. PatHightree

    PatHightree

    Joined:
    Aug 18, 2009
    Posts:
    297
    @lehrkommando
    I think the best fix for your situation is to try the beta version which works via the package manager
    That way each person in your team can decide for themselves if they want to use the driver or not.
    Please report any issues you encounter on github.

    The beta version and installation instructions can be found here:
    https://github.com/PatHightree/SpaceNavigator/tree/develop
     
  33. cecarlsen

    cecarlsen

    Joined:
    Jun 30, 2006
    Posts:
    862
    @PatHightree I just tested your beta and it works beautifully. I just want to thank you for sharing this with the community, it is very appreciated.

    EDIT. I wish I could provide you with hints on how to publish on asset store while still integrating with the package manager and dependencies. Haven't figured that one out yet - if it's even possible.
     
    Last edited: Aug 4, 2021
  34. PatHightree

    PatHightree

    Joined:
    Aug 18, 2009
    Posts:
    297
    @cecarlsen thanks for sharing that :)
    For now I have set up a secondary project which uses the github hosted package.
    Then its possible to publish to the asset store from that.

    Life has been throwing curve balls and my spare time is currently going towards other hobbies.
    This is as close as I have come to the SpaceNavigator lately...
     
  35. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    @cecarlsen and @PatHightree feel free to reach out via DM here/Twitter/Discord regarding Asset Store publishing as package with dependencies and samples. We found a proper way that is fully backwards compatible :). I'll post more about that soon but if you want to test it out happy to help (there's ~30 packages on the Asset Store today with that method).
     
    cecarlsen likes this.
  36. PatHightree

    PatHightree

    Joined:
    Aug 18, 2009
    Posts:
    297
    Thanks man, good to know there's an alternative to going the long way round
     
  37. cecarlsen

    cecarlsen

    Joined:
    Jun 30, 2006
    Posts:
    862
    Thanks @fherbst that is great news, super nice of you. I'll keep an eye on your upcoming tweets.
     
  38. LuthLexor

    LuthLexor

    Joined:
    Sep 13, 2021
    Posts:
    1
    Apologies if this is something that's been addressed already, but I'm having an issue after installing the SpaceNavigator asset. Works like a dream until it comes time to put Unity into Play Mode, that's when things go haywire. For some reason whenever I'm in Play Mode Unity is receiving a constant Left & Up input.
    I've gone through a lot of troubleshooting trying to narrow down the source of the input and I've come to the conclusion that its something with the 3DConnexion software. When I disable the driver, the problem is resolved but then of course I cannot use the SpaceMouse as desired. When I enable the driver, the problem returns. I realize that I can toggle the driver on and off, but that's a pain in the ass. I've gone into the SpaceMouse settings and tried to adjust every setting that I can think of and the only resolution I've been able to find is to disable the driver.
    Is there something in the asset settings or something else that I'm missing that I can adjust to compensate for this? Is this a classic case of Noob User Error? Maybe an issue with the current version of Unity that I'm using?
    Unity Version 2021.1.20f1
     
    Last edited: Sep 13, 2021
    noise_source likes this.
  39. cecarlsen

    cecarlsen

    Joined:
    Jun 30, 2006
    Posts:
    862
    Is anyone else experiences a constant drift the moment you connect the Space Navigator? I've checked in other apps and it only happens in Unity. As a workaround, in the game view I can simply subtract the drift values. For the scene view, disabling "Runtime Editor Navigation" in the settings window did nothing, so I downloaded the source files and added a return statement at line 68 in ViewportController. This completely disables navigation in the scene view. It would be lovely to avoid such hacks.
     
  40. PatHightree

    PatHightree

    Joined:
    Aug 18, 2009
    Posts:
    297
  41. kittynXR

    kittynXR

    Joined:
    Oct 2, 2020
    Posts:
    1
    TY for the releases!

    Posted about this in a potentially related issue on the github repo:

    I had been using the asset store driver for my SpaceMouse enterprise and it was working great with both Unity 2018, and then 2019 when most of my projects were migrated to the new version.

    Last week I got a new workstation and did a fresh install of everything and now the SpaceNavigator driver in Unity no longer works...Tried with the latest beta release version, also applied the pull requests from issue #34

    Changed input systems around and haven't been able to get it to work like it was before -- and I was quite impressed that the old driver from a 2017 upload worked flawlessly with this brand new device, so I'm a little surprised to see there was a need to change input systems.



    ~~~
    Also tried the tips section about disabling the HID device in device manager.

    Not quite sure what to do next....even uninstalled and reinstalled both Unity 2018 and 2019.

    There must be some kind of gimbal-lock going on...most of the time when you try to rotate in one direction it will first go the opposite way, before flipping around and going back the way you want (that is if the axis will even rotate that way at all).

    Both Z & Y that I highlighted are either stuck at that value or 0:
     
  42. gewl

    gewl

    Joined:
    May 19, 2016
    Posts:
    95
    This tool is amazing, but I'm running into the same problem of telekinesis transformations not being added to the undo stack that some others have mentioned. Has anyone found any workarounds for this? Fly mode is great, but this is a pretty brutal hamper on object placement.
     
  43. wuxu12

    wuxu12

    Joined:
    Oct 20, 2021
    Posts:
    6
    Hello, can this driver works well in webgl build? I have packaged and test to find the browser abort by error "269".So, do you have any solution to this problem? Please help me ,thanks.
     
  44. PatHightree

    PatHightree

    Joined:
    Aug 18, 2009
    Posts:
    297
    I would be highly surprised if it worked on WebGL, it was never intended to run there.
    You might have some luck with the version on github because as it's built on top of Unity's input system instead of a 3rd party dll. But again the driver was never meant to go there. You are on your own, in uncharted territory.
     
    Last edited: Dec 14, 2021
  45. AlessB

    AlessB

    Joined:
    May 18, 2017
    Posts:
    2
    Any progress on this bud? Just happily switched to ubuntu but I am really missing my spacenavigator!
     
  46. cecarlsen

    cecarlsen

    Joined:
    Jun 30, 2006
    Posts:
    862
    For future reference ...

    I revisited an old project and had trouble making the Space Navigator work in builds. The fix was to remove "SpaceNavigatorHID" from the list of "Supported Devices" in the "Input System Package" Player settings. Not sure why.
     
    Ony likes this.
  47. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    I've seen this as well and the reason is that there's a bunch of different "Device Names" for different space navigator devices, but they all work with the same bindings.
    Adding things to the "Supported Devices" has the side effect that instead of allowing every device it limits it to only the devices listed in the list, got me a few times.
     
    cecarlsen likes this.
  48. PatHightreeXVR

    PatHightreeXVR

    Joined:
    Dec 10, 2018
    Posts:
    19
    Just pushed version 2.0.0-pre.8 with a fix for the drifting by Stefan Beer
    If the drift occurs, crank up the deadzone sliders in the settings.
     
    Ony, cecarlsen, fherbst and 1 other person like this.
  49. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    I love that I'm still getting these updates Patrick! Not for the tool mind you, but seeing you're still around!

    It's been a loooong time man :D
     
  50. PatHightree

    PatHightree

    Joined:
    Aug 18, 2009
    Posts:
    297
    Hey Steve, me old mate, what a great surprise!
    Good to see you're still alive and kicking in Unity land
    Sent you a PM to catch up
     
    SteveB likes this.