uglyDwarf / linuxtrack

Headtracking for Linux/Mac
MIT License
158 stars 29 forks source link

Elite Dangerous support #105

Closed borisrorsvort closed 4 years ago

borisrorsvort commented 8 years ago

Does someone has ever tried to make this work with Elite Dangerous? Since this is getting traction (and many people using head tracking on PC for this game already), I believe a lot of people would be sooo thankful if this would work on unix systems.

uglyDwarf commented 8 years ago

Hi, I'm not too familiar with this game (beyond knowing it exists); could you point me to some info on wether it is possible to create a plugins or any other way to channel the tracking data to the game?

Kind regards,

Michal

borisrorsvort commented 8 years ago

I believe it's using: Virtual joystick output or Wine freetrack glue protocol. Also more info on https://github.com/opentrack/opentrack/releases/tag/opentrack-2.3-rc19p3

uglyDwarf commented 8 years ago

If you want to play it using Wine, then you should be able to use the Linuxtrack-Wine bridge - it supports both NaturalPoint's interface and the FreeTrack's interface...

But I thought you mean running the native Mac version... There you'd probably need the virtual joystick (unless there is some interface to channel the data in directly)...

Kind regards,

Michal

borisrorsvort commented 8 years ago

Don't know if it's wine. I'm playing it through steam mac client

uglyDwarf commented 8 years ago

Then it is going to be the native Mac version... (unless you run the steam client using Wine)

Looking around, I haven't seen any definite answer concerning the plugins/extensions development. Can you take a look around the forums you use and point me to some information concerning the third party development possibilities?

Thank you,

Michal

Ps. It looks that creating a virtual joystick in OS X requires creation of virtual device driver (in kernel, if I understand it correctly), which is something that I'd like to avoid if possible (can a single module be compatible with 10.6 up to 10.11?)...

borisrorsvort commented 8 years ago

Apparently not very promissing: https://forums.frontier.co.uk/showthread.php?t=135556&highlight=linuxtrack

uglyDwarf commented 8 years ago

What options are in the game to control the view? Would mouselook be usable? There is a Mac version of Mickey (virtual mouse) in the works...

If the virtual joystick would be needed, that would probably need a kernel extension, which is a much longer run and it also brings quite some inconveniences (to install a kext you need root password, if I screw up, it might make your system unstable, ...)...

Kind regards,

Michal

borisrorsvort commented 8 years ago

yeah i guess mouselook work since this how i'm using it now. Ctrl + mouse but that not really handy to have to push a button ^^ and just have mouselook without an additional key is not really an option either since you're controlling the ship with the mouse. (example: https://www.youtube.com/watch?v=-dD7LbDOaDU)

ghost commented 8 years ago

I stumbled upon some posts mentioning hooking up iPhone head tracking to foohid (https://github.com/unbit/foohid) and getting some promising results. Would that be an option?

uglyDwarf commented 8 years ago

Might be... Thank you for pointing me to that...

I'll take a look at it and see how it works... Kind regards,

Michal

ghost commented 8 years ago

That's a great news, Elite Dangerous is really meant to be VR.

aliher1911 commented 8 years ago

If anyone still interested in that topic I made Elite Dangerous work on Mac OS X with TrackIR. I used kernel driver from foohid which allows creating any mock HID devices programmatically and sending inputs to them which is pretty trivial. I created a gamepad with 3 axes mapped to roll, pitch and tilt. Then I used linuxtrack helloworld as a base and fed its reading into hid. You can map that virtual joystick in elite controls to control view. I didn't test that in anger, but it seems to work. Compiling the code, doesn't depend on anything other than IOKit standard framework and linuxtrack, and foohid has a MacOS installer to install kext which could be downloaded precompiled.

uglyDwarf commented 8 years ago

Hello, thank you for looking into that... I'll try to put together some small thing like the wiimote driver to make the process easier. Just one question - in the docs they mention Yosemite, do you know if it is usable in some older versions (I use 10.6 to compile Linuxtrack)? Kind regards, Michal

aliher1911 commented 8 years ago

I'm still experimenting with that at the moment. I compiled their kext by setting target system to 10.6, but I'm not sure that's a valid test, because I only tested that it loads and works on 10.9 and 10.11 so far. At the moment my glue code has hardcoded HID descriptors with tracking ranges as constants. Is it possible to get this information from the linuxtrack when initialising? In that case we can avoid having separate configuration for joystick or hardcoded values where it will just saturate axes if they get outside the range. I'm also trying to see if exposing those values as HID VR device will be recognized.

uglyDwarf commented 8 years ago

Hi, I did some tests too, but I was not able to get it compiled in 10.6 (the error messages were strange, maybe it uses some newer C++ features); will see if I can get compiled in 10.8, to 10.10...

At the moment, there is no way to get the tracking ranges; what you might use is some adaptation strategy - if a higher/lower value is read, make it a new threshold... Kind regards, Michal PS. I'll try to see what would it take to expose the limits through the Linuxtrack interface.

aliher1911 commented 8 years ago

Hi,

I created a repo with my code: https://github.com/aliher1911/linuxtrack-foohid-bridge It only needs IOKit which is available since 10.5. Also added possibility to expose data as VR HID device, but ED, that I use for testing, doesn't seem to support it.

As for driver, since there's no 10.6 SDK in current XCode, it makes it hard to test. I was only changing build and compiling with current SDK.

Regards

uglyDwarf commented 8 years ago

Thank you, I do have 10.6 setup (I compile Linuxtrack on it), however I use newer kernel (it is Ivy Bridge machine), so I don't know if foohid is going to work on it... I plan to take a deeper look at it during the weekend (I'll have more time to dig deeper)... It would be nice if these headtracking devices used the existing standard, but I'm afraid that they won't (not sure about Steam VR; as far as Occulus is concerned, I think they pipe all the info through their proprietary interface). Kind regards, Michal

iadesdragon commented 8 years ago

Hi uglyDwarf,

i´ve been using LinuxTrack on my Mac with X-Plane 10 for years now and i still love it!!! Nonetheless i am a great Elite Fan as well and eventually got me a new iMAC wich is capable of running Elite well. Therefore i am quit interesting to learn if there has been any progress on interfacing linuxtrack to elite ( mouse mode at least? )?

I did however try the latest release of Linuxtrack, but it still does not seem to work...

aliher1911 commented 8 years ago

Hi, iadesdragon, You can follow the route I did in the link above, works ok for me. There's no nice gui or anything, just a tool you run from terminal that exposes linux track as a joystick while it is running. You need to center your head when launching it since it doesn't have reset input. MacOS Elite itself doesn't seem to accept any input other than mouse or joystick, no luck with any hid vr devices because of that. Ping me if you need any help running it.

iadesdragon commented 7 years ago

Hi, aliher1911

so far i did not manage to get your tool compiled :-( Is there anything special i need to know? I personally feel that Elite is running a lot better on OS X then on windows ( for the same machine ) so getting TrackIR working is high prio :-)

Is there any way to simply obtain a compiled version of the tool or do i need to compile it to have it working at system/root level?