Jump to content

Partial TrackIR support with FreePIE


Tachi1986

Recommended Posts

andersmalmgren.github.io/FreePIE/

 

I wanted to use my TrackIR for this game like in some space games. MWO has support, but was made with a different engine and hasn't been implemented yet. I looked around online and found

a program called FreePIE that can run scripts that affect peripherals, including TrackIR. I then found a decent script for TrackIR and another to hold a button down with a toggle key press. Together I could toggle the TrackIR and hold down the freelook key and look around.

 

Works well when walking longer distances and just wanted to scan the terrain quickly. Not very good for combat yet. Wish there was a way to disable mouse movement in the mech and still use the mouse for freelook all at the same time.

 

Here is the script.

Uses "Z" to turn it on, and "C" to toggle the freelook key being constantly held down. I'm using "Right Mouse Button" for freelook. All can be changed with the proper syntax, there's a guide on the main page

for FreePIE, and forums.

 

#Use Z to toggle on/off [DISABLED:and right mouse to activate head tracking]
#(Good for games like EMPYRION)
deltaYaw = 0
def update():
global deltaYaw

cur_yaw = trackIR.yaw
deltaYaw = filters.delta(cur_yaw)

if cur_yaw > threshold:
deltaYaw += (cur_yaw - threshold) / 75 #.6
elif cur_yaw < -threshold:
deltaYaw -= -(cur_yaw + threshold) / 75 #.6
#diagnostics.watch(origin_yaw)

deltaPitch = filters.delta(trackIR.pitch)

if (enabled):
mouse.deltaX = deltaYaw*multiply_x
mouse.deltaY = -deltaPitch*multiply_y

if starting:
enabled = False
multiply_x = 15
multiply_y = 15
trackIR.update += update
threshold = 45

toggle = keyboard.getPressed(Key.Z)

if toggle:
enabled = not enabled

if keyboard.getPressed(Key.C):
mouse.setButton(1, not mouse.getButton(1))

 

* Install FreePIE, run as Administrator just incase. Turn on your TrackIR. Load the FreePIE script and run FreePIE "F5". I use AntiMIcro (just like Xpadder) to get macro keys and such for my

T Flight Hotas 4. I made a button that hits both "C" and "Z" together. Works well for now.

 

I hope you guys find this useful, and I hope even more that this can be perfected somehow. Thank you all for reading!

Link to comment
Share on other sites

  • 2 months later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...