Method for "Functional" TrackIR in Rebirth.

General discussions about X Rebirth.

Moderator: Moderators for English X Forum

Post Reply
n00dles
Posts: 1
Joined: Tue, 10. Jan 17, 14:39
x4

Method for "Functional" TrackIR in Rebirth.

Post by n00dles » Tue, 10. Jan 17, 14:58

Sorry if this has already been done/bettered, but in my searching couldn't find anything.

I hacked this together to get something like working TrackIR in Rebirth, bare in mind this has flaws. I also play the game entirely from my Warthog HOTAS and toggle the freelook wherein my trackIR takes over the mouse to look around, there is some drift and often have to reset POV. But don't care enough to put anymore effort into making a "perfect" solution.

You'll need FreePIE http://andersmalmgren.github.io/FreePIE/

and the following python code, copy that into FreePIE, save and run. With your TrackIR running as usual if you've done everything correctly as soon as you run the script your TrackIR will be sending mouse input, should be pretty obvious. Then just fire up the game and toggle freelook.

Code: Select all

#Use one:one profile in TrackIR
#Tweak Head Track sensitivity using "multiply = X"          PageDown to toggle on/off 
#Tweak Zooming sensitivity using "maxZoom = X"              End to toggle on/off 
#Tweak Lean/Strafe minimum distance using "minLean = X"     Delete to toggle on/off 

# Change these variables to customize your experience
if starting:
    enabledHT = True            # Set to True or False depending on if you want the headtracking to begin immediately 
    multiply = 30               # Speed of head tracking

# Change these button to remap the toggle keys
toggleHT = keyboard.getPressed(Key.PageDown)    #Toggle Head Tracking

# mapping..
def update():
    yaw = trackIR.yaw
    pitch = trackIR.pitch

    deltaYaw = filters.delta(yaw)
    deltaPitch = filters.delta(pitch)

    #__Head Look Section__
    if (enabledHT):
        mouse.deltaX = deltaYaw*multiply    
        mouse.deltaY = -deltaPitch*multiply

if starting:
    trackIR.update += update    

if toggleHT:
   enabledHT = not enabledHT
I haven't taken into account other control methods or improvements as I just cobbled this for my own needs, do with it what you will.

User avatar
Santi
Moderator (DevNet)
Moderator (DevNet)
Posts: 4046
Joined: Tue, 13. Feb 07, 21:06
x4

Post by Santi » Tue, 10. Jan 17, 15:50

The latest patch, currently in Public Beta adds Track IR and FreeTrack support.

http://forum.egosoft.com/viewtopic.php?t=355582

It is very nice of you to share your solution for those that want it now. Maybe this topic would be more appropriate for the mod section of the forum.
Last edited by Santi on Tue, 10. Jan 17, 15:51, edited 1 time in total.
A por ellos que son pocos y cobardes

Commander_K
Posts: 102
Joined: Tue, 24. Jul 12, 21:01
x4

Post by Commander_K » Tue, 10. Jan 17, 15:51

Native TrackIR and FreeTrack support is coming in 4.10 (in beta right now).

birdtable
Posts: 2055
Joined: Sat, 7. Feb 04, 20:42
x4

Post by birdtable » Tue, 10. Jan 17, 18:37

Would be grateful for some advice regarding TrackIR and FreeTrack,, which system works best and if someone has experience of either system in Rebirth 4.10 beta does it add to the overall immersion/enjoyment of Rebirth..?

Alan Phipps
Moderator (English)
Moderator (English)
Posts: 30371
Joined: Fri, 16. Apr 04, 19:21
x4

Post by Alan Phipps » Tue, 10. Jan 17, 21:53

Moving to Rebirth Universe from Tech Sp.
A dog has a master; a cat has domestic staff.

Post Reply

Return to “X Rebirth Universe”