Page 1 of 1
Spaceball camera positioning
Posted: 27 Mar 2008, 02:46
by LoialOtter
I'ld like to see integration of the 3dconnexion spaceball series of devices. I know the drivers are available under both windows and linux. Under windows it might be easier just supporting the USB devices (spaceball 5000USB and latter) as the Serial drivers are no longer supported by 3dconnexion.
I've read over the license agreement for the SDK they have available. It looks like the driver would have to be distributed in binary or object form only, i could easily be wrong in this though. There are no royalties.
Is it possible to make something like this as a plugin?
Thanks in advance
Loial
Re: Spaceball camera positioning
Posted: 27 Mar 2008, 03:00
by AF
While the developers here have plenty of things to do here, you must understand that their time is not infinite, and that their time must be used to affect a wider audience, however a patch implementing this is always welcome ^_^
Re: Spaceball camera positioning
Posted: 27 Mar 2008, 03:11
by LoialOtter
Understood. It was just a request and I understand not many people have these devices.
I don't have any development systems up and running but I guess I could possibly set one up. Is something like this possible in Lua or through a plugin? any idea how hard it would be ignoring the SDK side of things?
Re: Spaceball camera positioning
Posted: 27 Mar 2008, 03:12
by Argh
Um, I assume that the input device just isn't even seen by Spring as a valid input device? Or does it do stuff, just not the way you expect?
Re: Spaceball camera positioning
Posted: 27 Mar 2008, 03:38
by LoialOtter
Reading some online, the spaceball 4000FLX can be set up as a joystick. Other versions of the hardware can not (though a couple earlier ones might be supported).
Under windows, not quite as lucky. It looks like simple code in their examples, but it isn't a joystick or input device. I can't seem to find it in the device tree either.
It's not seen by spring at all under windows, i have not tested under linux
Re: Spaceball camera positioning
Posted: 27 Mar 2008, 07:10
by SinbadEV
Some guy made a head tracking camera widget so it's entirely possibly you could patch together his project and some of the sample code for this spaceball thing and get something working.
Re: Spaceball camera positioning
Posted: 27 Mar 2008, 08:06
by KDR_11k
bind shift ludicrousspeed
Re: Spaceball camera positioning
Posted: 29 Mar 2008, 01:16
by LoialOtter
Thanks for the heads up on the head tracking widget, that's awsome.
Makes it easier to bind the spaceball into other apps too using script languages.
I'll get working on it as soon as I have some time (heh). I think it'd be an awsome thing to have.
Re: Spaceball camera positioning
Posted: 30 Mar 2008, 10:15
by LoialOtter
I've got a working pair of scripts, one in Python using the COM interface to get data from the spaceball and give a simple gui for showing it's working; The other is the Lua script that controls the camera in Spring.
Man it's tough to find info on the camera interface, i had to nose around in the source code till i had a bit of a clue of what i was doing.
The head tracking widget realy helped a lot, thanks Beherith.
The setup works well under free camera mode and kinda works under TA camera mode. I'ld like to set up one of the camera modes as a map control rather than a camera control if that makes any sence. Right now if you move the spaceball it moves or rotates the camera; I'ld like it to move or rotate the map around a certain distance from the camera or the like. Not quite sure how to do this yet though.
Re: Spaceball camera positioning
Posted: 30 Mar 2008, 11:03
by LoialOtter
Here's the files. Still don't have the other camera mode down.
I think this is pretty good for my first script in Lua. Nice language, I might add it to some of my own projects.