• Projects
  • 3Dconnexion Space Mouse Support in Godot

Megalomaniak Well, it kinda works. Most things being inverse and wayyyyy too sensitive.

I also tested on 60Hz and 144Hz monitors, but since the update happens in Godot (in _process()) there may be some timing issues if you have a weird refresh rate. What kind of monitor do you have?

    @Megalomaniak If you're on Windows, you have to open the 3Dconnexion driver after you open the Godot editor. Then click the settings, it should show a popup for the godot-x86_64.exe. In there, uncheck everything, so that you don't get double control.

    cybereality Strange. I tested the old wired (same one I sent you) and the new wireless model, on Windows, Linux, and macOS. This was designed for Godot 3.4.4 but it should be compatible, I don't think the API changed. Can you list out the relevant specs of your machine (OS and version, Godot version, etc.)?

    I'm pretty sure it's just up to expectations and preferences. I tend to think in terms of moving and manipulating the camera rather than the object/world which causes everything to feel inverse to my brain. In other words: it's psychosomatic.

    edit: well, the sensitivity might be to do with my device being new and underused. Hasn't "worn in" yet perhaps so still overly sensitive.

      cybereality I also tested on 60Hz and 144Hz monitors, but since the update happens in Godot (in _process()) there may be some timing issues if you have a weird refresh rate. What kind of monitor do you have?

      75hz Freesync over HDMI and radeon chill is set to 'on', targeting 50 to 75 range in global profile. But godot reports pretty much a constant 75fps update anyways.

      Megalomaniak I'm pretty sure it's just up to expectations and preferences.

      I could see that. I've been using the Space Mouse off and on for like 15 years, so I am very comfortable with it. When I first got it it did seem very fast, but it's just sensitive. Also note that the focus/pivot is on the selected object (or the world origin, if nothing is selected). The movement will slow down as you get closer to the object.

      I tried to tweak it to get a balance where you could still control and get up close to something down to like 10cm but it would still feel okay up to like 10m. If you go too far out it will get fast, so if you have a large level you might have to click on an object closer to the camera.

      I wanted to add sliders to adjust the speed, but it doesn't look like you can export variables in editor plugins. My only option was to make a new dock, where I could attach settings. I might still want to do that, depending on the feedback I get. In the meantime, you can open the file addons/spacemouse/SpaceMouse.gd and look for these two variables.

      const translate_speed = 0.1
      const rotate_speed = 0.02

      Feel free to change them if you like (you will have to enable/disable the plugin to see the effect). Converting the code to fly the camera is probably a lot more work, but I can look into it. I might have to make that dock anyway, so if that's the case I can put in some other options.

        cybereality In the meantime, you can open the file addons/spacemouse/SpaceMouse.gd and look for these two variables.
        const translate_speed = 0.1
        const rotate_speed = 0.02
        Feel free to change them if you like (you will have to enable/disable the plugin to see the effect).

        I suspect trying to tighten those scalar values down would likely just run into floating point precision issues, but I guess I could try.

        cybereality I wanted to add sliders to adjust the speed, but it doesn't look like you can export variables in editor plugins. My only option was to make a new dock, where I could attach settings.

        I think in this case, just having a config.ini or just conf(no extension) file in a sort of plain text format would probably be fine.

        It might be a good idea to include the version number in the release zip file name.

        Edit: yeah this is a huge QoL improvement! the camera mode with some speed adjustments makes a big difference. 🙂

          Megalomaniak It might be a good idea to include the version number in the release zip file name.

          Yeah, good call. I updated the zip names.

          Kojack Haven't tried it yet, but I will. 🙂

          Yes, please do. There is a very small market for people with Space Navs that are also using Godot.

            It's working fine for me.
            Windows 10, Godot 3.4.4, both Space Navigator and Space Pilot Pro.

            One thing that would be nice is saving the settings.

            Does Godot support addons that are project independent? Unity pretends to not do addons that are outside of the project (so the tool is available in all projects automatically), but there's an undocumented way to do it (I use it for my Unity Connexion plugin) which Unity provides for its own editor addons.

            Oh yeah, I could save the settings, it wouldn't take long. I wanted more people to test it and give feedback before I submit to the asset library. So far I only got you two here that I know tried it. Some other people mentioned they were going to download, but I never heard back from them.

            I believe the plug-ins are project specific. But once it is on the asset library, you can click one button in the editor and it will install itself. So that is good enough for me, but I can double check if there is some global way to do it.

              cybereality
              One of the issues I had with project based addons in Unity was when I wanted to use it with student projects. It got annoying to have to modify many student projects to do something that is unrelated to the project. Plus being careful to not include it when pushing changes I might make to the project.
              Unreal, 3DSMax, Maya, Blender, Sketchup, Visual Studio, etc all let you install addons to the editor itself.
              Obviously not something you can do if Godot doesn't support that, just something I've run into before. Ideally both would be supported, project payload addons and global editor addons.

              You could probably go on the Connexion dev forums and ask if anyone wants to try it out. https://forum.3dconnexion.com/

              I got the Xbox controller technically working, but it's really bad. I mean, it works, but it felt really bad and not much better than just using the mouse. Not sure it's worth investigating any further, but maybe I will take another look tomorrow.

              9 days later

              So I'm considering this project done. The 1.4.3 version is on Github and can now be installed directly in the Godot editor via the Asset Library tab.
              https://godotengine.org/asset-library/asset/1383

              Also, just in case anyone finds this by search and is working on something similar, the vendor and product ids for all Space Mouse devices are listed on the 3Dconnexion FAQ:

              Keyboard Pro: USB\VID_256F&PID_C664\…
              Numpad Pro: USB\VID_256F&PID_C665\…
              CadMouse Pro: USB\VID_256F&PID_C656\…
              CadMouse Compact: USB\VID_256F&PID_C655\…
              CadMouse Compact Wireless: USB\VID_256F&PID_C658\…
              CadMouse Pro Wireless: USB\VID_256F&PID_C654\…
              CadMouse Pro Wireless Left:  USB\VID_256F&PID_C657\…
              SpaceMouse Enterprise: USB\VID_256F&PID_C633\…
              CadMouse: USB\VID_256F&PID_C650\…
              CadMouse Wireless: USB\VID_256F&PID_C651\…
              Universal Receiver: USB\VID_256F&PID_C652\…
              SpaceMouse Compact: USB\VID_256F&PID_C635\…
              SpaceMouse Pro Wireless Receiver: USB\VID_256F&PID_C632\…
              SpaceMouse Pro Wireless (cabled): USB\VID_256F&PID_C631\…
              SpaceMouse Wireless Receiver: USB\VID_256F&PID_C62F\…
              SpaceMouse Wireless (cabled): USB\VID_256F&PID_C62E\…
              SpaceMouse Pro: USB\VID_046D&PID_C62B\…
              SpacePilot Pro: USB\VID_046D&PID_C629\…
              SpaceExplorer: USB\VID_046D&PID_C627\…
              SpaceNavigator: USB\VID_046D&PID_C626\…
              SpaceNavigator for Notebooks: USB\VID_046D&PID_C628\…
              SpaceTraveler: USB\VID_046D&PID_C623\…
              SpacePilot: USB\VID_046D&PID_C625\…
              SpaceBall 5000 USB: USB\VID_046D&PID_C621\…
              SpaceMouse Plus USB: USB\VID_046D&PID_C603\…
              SpaceMouse Plus XT USB: USB\VID_046D&PID_C603\…
              SpaceMouse Classic USB: USB\VID_046D&PID_C606\…
              CadMan: USB\VID_046D&PID_C605\…

              https://3dconnexion.com/uk/support/faq/how-can-i-check-if-my-usb-3d-mouse-is-recognized-by-windows/

              I already have the 7 most popular devices on my plug-in (the standard consumer models) but I may update my product id database in the future. I am just pretty busy and most of those are CadMouse and stuff I don't think Godot users are using. However, I will update at some point.