EnglishGermanFrenchRussianPolishItalianSpanish
Log inRegister
 
Method for "Functional" TrackIR in Rebirth.
Post new topic Reply to topic
View previous topic :: View next topic
Author Message
n00dles





Joined: 10 Jan 2017



PostPosted: Tue, 10. Jan 17, 15:58    Post subject: Method for "Functional" TrackIR in Rebirth. Reply with quote Print

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:

#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.

Back to top
View user's profile Send private message
Santi
Moderator (DevNet)
Moderator (DevNet)

MEDALMEDALMEDAL

Joined: 13 Feb 2007
Posts: 3109 on topic
Location: UK
Thank you for registering your game
modified
PostPosted: Tue, 10. Jan 17, 16:50    Post subject: Reply with quote Print

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.


_________________
A por ellos que son pocos y cobardes


Last edited by Santi on Tue, 10. Jan 17, 16:51; edited 1 time in total
Back to top
View user's profile Send private message
Commander_K





Joined: 24 Jul 2012
Posts: 35 on topic

Thank you for registering your game
PostPosted: Tue, 10. Jan 17, 16:51    Post subject: Reply with quote Print

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

Back to top
View user's profile Send private message
birdtable





Joined: 07 Feb 2004
Posts: 1129 on topic

Thank you for registering your game
PostPosted: Tue, 10. Jan 17, 19:37    Post subject: Reply with quote Print

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..?

Back to top
View user's profile Send private message
Alan Phipps
Moderator (English)
Moderator (English)

MEDALMEDALMEDAL

Joined: 16 Apr 2004
Posts: 16088 on topic
Location: Stonehenge, UK
Thank you for registering your game
PostPosted: Tue, 10. Jan 17, 22:53    Post subject: Reply with quote Print

Moving to Rebirth Universe from Tech Sp.


_________________
A dog has a master; a cat has domestic staff.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic Reply to topic
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Control Panel
Login Data
The time now is Sat, 25. Feb 17, 04:14

All times are GMT + 2 Hours


Board Security

Copyright © EGOSOFT 1989-2017
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.18939 seconds, sql queries = 19