I've been trying to get TrackIR to work within Outerra and finally stumbled across a solution called FreePIE which in my case atleast did the trick. Obviously without in-built support for TrackIR by Outerra I was left to try and find alternatives.
My first attempt was the mouse emulator which came with the TrackIR software but that is as good as useless. A little research into that software brought about the revelation that any game which indirectly supports it must use DirectInput for their mouse control for it to have any effect in the first place. A fair amount of games cannot even use that simple mouse emulation for that very reason.
I've seen some posts here by others who have had success using TrackIR with a software application called FreeTrack, which incidentally borked the whole thing with a recent build when bringing in support for Occulus Rift. I tell ya, that device is the bain for TrackIR I tell ya. I'm definitely getting me one when they come out. I tried FreeTrack anyway but could not get it to recognise my TrackIR unit for some reason.
Anyway, FreePIE (
http://andersmalmgren.github.io/FreePIE) is an Input Scripting Interface which uses the Python programming language, which thankfully for me is very similiar to C/C++. It allows one to script input control scripts for various input devices including TrackIR.
Here is a TrackIR Script I ripped of their website and then slightly modified to remove the need to hold down the hotkey which in this case was the right mouse button.
#Use Z to toggle on/off [DISABLED:and right mouse to activate head tracking]
#(Good for games like Outerra)
def update():
yaw = trackIR.yaw
pitch = trackIR.pitch
deltaYaw = filters.delta(yaw)
deltaPitch = filters.delta(pitch)
if (enabled): #if (enabled and hotkey)
mouse.deltaX = deltaYaw*multiply
mouse.deltaY = -deltaPitch*multiply
if starting:
enabled = False
multiply = 20
trackIR.update += update
#hotkey = mouse.rightButton
toggle = keyboard.getPressed(Key.Z)
if toggle:
enabled = not enabled
Something I noticed when using this script is that it even allows TrackIR to reset the viewpoint back to some pre-designated datum point which is usually by the F12 key. There is a bit of a trick here though. Because of the lack of support in-game for TrackIR any truelook feature does not exist, meaning all view navigation is relative. With that in mind, everytime you activate TrackIR immediately press F12. This will reset the viewpoint to that current direction and any subsequent F12 presses from that point will return the view to that original direction.
ie. the front facing cockpit view for example.
The above script uses Z as the toggle button to enable/disable TrackIR. This was the original key in the script but can obviously be changed if you feel the need.
I am going to experiment further with this and will update if I come across any other relevant information/insights.