-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rotation not working for SpaceNavigator Wireless in editor and playmode #31
Comments
Is your device a SpaceNavigator or another variant ? |
@PatHightree Yes, I am using the 3DConnexion SpaceNavigator. |
Can you rotate the camera in the sceneview ? |
@PatHightree Sorry, cannot do it. Unity cannot get any rotation vectors from the SpaceNavigator. |
Maybe there is a hardware variation. |
@PatHightree Here it is: https://www.dropbox.com/s/us3kru5fch6q50r/SpaceMouse.json?dl=0 Thanks! BTW: Can this driver work with Spacemouse Enterprise? |
Strange, this json file doesn't look like mine at all, even the vendorId and productId are different. The driver might support the Spacemouse Enterprise as is, if it uses the same data layout as the SpaceNavigator. |
Hi @PatHightree, I have tried several different data formats to fetch the rotation, only Do I need to start a new issue for that? |
AH, you're using a wireless SpaceNavigator, that uses a different data layout than the wired version. P.S. |
Hi, I am using the SpaceMouse wireless and getting the same issue, too. |
Hi @PatHightree , Actually, I am using SpaceMouse wireless with wire, but neither of the two scripts in the project can get the rotation data. I will start a new issue. Thanks! |
@unsetlay @JiapengChi |
@PatHightree I am also able to repro this issue with SpaceMouse Wireless P/N: 3DX-600044 PID: A4318303087 on Windows 10. I am happy to test when a fix is in the works. As a workaround, if someone needs a live repo (not the old unitypackage) that you can at least have Scene View functionality for SpaceMouse using the 3DConnexion Driver on Windows, I am using this fork: https://github.com/Dinomite-Studios/space-mouse-unity. You must paste |
Hi @PatHightree , May I ask what kind of tool you use for reverse engineering of HID device events? Thanks. |
Just the Unity Input Debug window, the Unity forums and Google |
In case this is useful for anyone, I managed to get rotation working with my SpaceMouse Wireless when connected via USB cable.
I then found that yaw and roll were swapped, so swapping the offsets for these in SpaceNavigatorWirelessHIDState.ReportFormat1 (like in SpaceNavigatorHIDState.ReportFormat2) got this working properly too:
Versions: No joy getting the Universal Receiver working, but I guess that's issue #50. |
Thanks a lot @jondowen. This works great in editor and play mode. But in a windows standalone player build rotation does not work, just translation unfortunately. Any chance you solved that as well? |
Thanks @jondowen , this works great on my end too. Recap: both translation and rotation working in Play mode as well as Windows Standalone build |
I'm now using Unity 6000.0.2f1 and no longer get the crash when plugging in the Universal Receiver. I've modified the code slightly to register devices for both:
Modified code:
For me, that addresses issue #50, but I don't have any other hardware so can't verify that I haven't broken anything else. It's very nice to be able to go wireless again! |
Hi Jon, great to hear you're making progress |
Describe the bug
Hi, I tried the Fly Around sample scene, but I noticed that I cannot rotate the camera or the target sphere. I printed the SpaceNavigatorHID.current.Rotation.ReadValue(), which was always (0.0, 0.0, 0.0). So was in the Input Debugger.
Did I do something wrong?
Desktop:
Thank you so much.
The text was updated successfully, but these errors were encountered: