cybereality / godot-space-mouse

Enables 6 degrees of freedom control for the viewport camera in the Godot editor.
MIT License
37 stars 9 forks source link

Addon not working on Ubuntu 20.04.4 with Godot 3.5 #4

Closed kalbfled closed 2 years ago

kalbfled commented 2 years ago

I followed the installation instructions, including enabling the addon and copying the udev rules. I see the "Space" UI panel, but there is no response to Space Mouse input. It works as expected in Blender.

In the Space UI, I tried camera and object mode. I tried unplugging and re-plugging the Space Mouse receiver, and I tried running the udevadm commands you specify.

cybereality commented 2 years ago

Which model Space Nav do you have? I just tested on Godot 3.5 and Ubuntu 22.04.1 and it still seems to be working. Are there any errors or warnings in the console? The plug-in also doesn't refresh when the editor is open, so if you replug it in, you have to restart the editor. I've noticed sometimes testing in Blender first, then opening Godot can help if it loses the connection.

kalbfled commented 2 years ago

Thank you for the timely response. I have the 3dconnexion Space Mouse Wireless, which I purchased new about 3 or 4 years ago.

In the console (with non-system directory paths replaced by ellipses:

...$ OpenGL ES 2.0 Renderer: NVIDIA GeForce GTX 980/PCIe/SSE2
/lib/x86_64-linux-gnu/libasound.so.2: undefined symbol: snd_dlpath

ERROR: Can't open dynamic library: .../addons/spacemouse/bin/libspacemouse.so. Error: libhidapi-hidraw.so.0: cannot open shared object file: No such file or directory
   at: open_dynamic_library (drivers/unix/os_unix.cpp:412)
ERROR: No valid library handle, can't get symbol from GDNative object
   at: get_symbol (modules/gdnative/gdnative.cpp:510)
ERROR: No nativescript_init in "res://addons/spacemouse/bin/libspacemouse.so" found
   at: init_library (modules/gdnative/nativescript/nativescript.cpp:1503)
SCRIPT ERROR: Attempt to call function 'new' in base 'NativeScript' on a null instance.
          at: _ready (res://addons/spacemouse/SpaceMouse.gd:7)

I'm missing a dynamic link library. I don't know if it matters, but I installed Godot by downloading the Linux binaries directly from the website and unzipping them.

cybereality commented 2 years ago

It looks like you have to do this: sudo apt install libhidapi-hidraw0 I thought that came with Ubuntu, but I guess not. If that works, I'll update the README.

cybereality commented 2 years ago

You may also need to add this line to your .profile export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

kalbfled commented 2 years ago

It works after installing libhidapi-hidraw0. I didn't need the export line. Thank you so much for this addon. This functionality has been on my wish list since I started using Godot in 2019.