Rocket League

Rocket League

34 ratings
Using TrackIR with Rocket League
By Zyrjello
Configure your TrackIR to control the camera in Rocket League. This guide presupposes that you use an Xbox 360/One controller, but may be adapted for other control schemes.
   
Award
Favorite
Favorited
Unfavorite
Overview

View in higher quality[gfycat.com]

Rocket League's use of the right stick to look around is a little awkward, since you can't easily use any of the face buttons while you're fiddling with the stick. If you have a TrackIR (or equivalent head tracking system, like FreeTrack), you can now configure it to emulate the right stick of your controller.

This guide presupposes that you are using a conventional gamepad to control Rocket League. I use an Xbox One controller, but I see no reason that it shouldn't be adaptable to any controller.

Caveat: Your head tracker will work exactly like the right stick of the controller, which means there's a big 'ol dead zone in the middle. This makes it pretty tough to exactly track the ball.

Here's the high-level technical overview:
  • Use FreePIE to map TrackIR movements to a virtual joystick that emulates only the right stick of a controller.
  • Use x360ce to combine the virtual joystick's input with your physical gamepad.
  • Use x360ce to trick Rocket League into using this fancy combined virtual gamepad.

You may be able to use these principles to do similar things in other games, though your FreePIE script may take some tweaking. I'm not an expert on the FreePIE API, but I'll be happy to try to provide some assistance if you have questions.
Prerequisites
  • Head tracking software/hardware (this guide uses TrackIR, but FreeTrack should also work with some modifications.)
  • vJoy[vjoystick.sourceforge.net]
  • FreePIE[andersmalmgren.github.io]
  • x360ce[www.x360ce.com] (32-bit version) For the sake of simplicity, you can extract it right to Rocket League's install directory (\Steam\steamapps\common\rocketleague\Binaries\Win32\)

Install each of the above pieces of software. Configuration of each is discussed below.
vJoy Setup
Install vJoy and ensure that a single virtual joystick is configured with the configuration tool:



We really only need the Rx and Ry axes, but there's no harm in leaving the default configuration.
FreePIE Setup
Copy this code and save it to a .py file somewhere on your hard drive (for example, trackir-rightstick.py).
def update(): yaw = filters.mapRange(trackIR.yaw, -90, 90, -vJoy[0].axisMax, vJoy[0].axisMax) pitch = filters.mapRange(trackIR.pitch, -90, 90, -vJoy[0].axisMax, vJoy[0].axisMax) vJoy[0].rx = yaw vJoy[0].ry = pitch if starting: trackIR.update += update

(If you're using FreeTrack, you should be able to replace all instances of "trackIR" with "freeTrack". I don't use FreeTrack, so I can't vouch for it.)

To test it, open up the vJoy monitoring application, then run your script in FreePIE. Turn your head and make sure the Rx and Ry axes in vJoy are moving according to your head movements.



If you're not seeing any response, try running FreePIE as an administrator. I've found that FreePIE cannot read TrackIR data on my machine without being elevated.
x360ce Setup
x360ce is the pickiest of the bunch in my experience. If you ever find that it's not responding upon startup, try disabling your vJoy device temporarily (vJoy configuration > uncheck "enable vJoy").

Launch x360ce. It should detect your controllers. It will prompt you to search for default configurations. You should choose a configuration for your actual gamepad, but there's no need to choose one for the vJoy device. We'll do that manually.

Before configuring individual controllers, enable combining. This will allow us to mash vJoy's right stick into your actual controller's right stick.



On the first tab (Controller 1), verify that you see a green box.



If you don't, check the Advanced tab and make sure pass through is disabled.



On the General tab, make sure the configuration matches your controller. You should be able to press buttons and move axes on your controller and those actions should be reflected on the graphic on-screen.

Back in the Advanced tab, enable rumble passthough if you're using an Xbox controller.
Also on the Advanced tab, enable combining into the first controller.



Now let's switch over to the vJoy device. You only need to configure the right stick. Set the horizontal axis to Axis 4 and the vertical axis to IAxis5. (You may want to use Axis 5 instead of IAxis 5, depending on your vertical inversion preference.)



Switch to the Advanced tab and enable combining into the first controller.



At this point, your head tracker should be working as your right stick. To test it, run your FreePIE script, switch to the General tab on the first controller's tab in x360ce, and move your head. The graphic on-screen should show movement on the right stick.

Finally, sync your settings to Rocket League. If you installed x360ce to Rocket League's install directory, you can skip this step.

Playing Rocket League
Before you launch Rocket League, close x360ce. It does not need to be open to work once its settings are synced to the Rocket League directory.

Make sure your script is running in FreePIE.

Upon launching Rocket League, you should hear a system "ding" to indicate that x360ce's configuration was loaded. Once you're on the main menu, turning your head should move the camera around your car. Launch a free mode game and verify that your TrackIR is controlling your camera. From here, you should only need to tweak your TrackIR curves to produce an optimal experience.
16 Comments
r/frewtyfans Apr 29, 2023 @ 11:38pm 
nice guide
Mohammed, His Prophet Oct 2, 2020 @ 5:40am 
Good stuff.
Maddias Mar 23, 2019 @ 2:48pm 
isn't this considered cheating though?
Knightmare Feb 20, 2019 @ 5:27am 
Not all heroes wear capes..

Thank you!
. Aug 28, 2018 @ 10:00am 
Thx that is the best helpfully instruction i could find online so far.
Only one thing or maybe two you should change in the description which didnt work for me.

"Finally, sync your settings to Rocket League. If you installed x360ce to Rocket League's install directory, you can skip this step."

Had problems until i installed into the directory of the targetgame and sarted as administrator,
seems to me like there could be some trouble with right managment and inheritance for some reason. So it worked correctly since i generated the .dlls as an administrator from the target directory.
Also i made a mistake only to copy paste the script.
The script needs the spaces, form to work correctly!

THX now it also works with other games.:ss13ok::yazdsmile:
Finaly!

Pig Pen (Germany) Dec 16, 2017 @ 7:56am 
sorry first for me bad english:
aso i have trackir5 and rumbel pad2 froem logitech and i become too not to run in rocket or other game the headtrack. any a idee what i can make?
Zyrjello  [author] Oct 22, 2016 @ 11:26am 
Hi Speedy,

I haven't tested this in a long time, mostly because vJoy tends to break my controller these days. :(

Mouse input probably won't work, since I believe Rocket League ignores mouse input while it's receiving controller input. But give it a shot! You wouldn't need the x360ce or vJoy components in that case.
Speedy Von Gofast Oct 22, 2016 @ 9:46am 
Using your method doesn't work at all for me.

When I made the setup with x360ce, my controller and the RS emulation doesn't work at all.

I tried with my Steam Controller but the stick emulation does not work.


I wonder if it is possible to make a workaround with mouse movement with FreePIE but I don't have a clue about how to code it.

With the mouse moving around the center of the screen with the TrackIR, and binding the mouse axis to "camera swivel" may do the trick.
Zyrjello  [author] Jan 21, 2016 @ 5:34pm 
@Rustysandwiches: Potentially. FreePIE can read Oculus data. Howeever, I'm pretty sure it would not work very well for actual play.
Russtysandwiches Jan 21, 2016 @ 12:39pm 
is it posible to use the oculas with the same softwere