Axis redirection in FreePIE
-
- One Eyed Hopeful
- Posts: 5
- Joined: Mon Nov 14, 2016 8:02 pm
Axis redirection in FreePIE
I have Saitek's X-45 HOTAS controller and have been using GlovePIE for programming as Saitek/MadCatz no longer support it, at least not for Windows 10 64-bit. I recently discovered FreePIE, since GlovePIE killed itself by politics, and am start to get the hang of the basics.
One problem I've discovered is that my throttle control isn't the z-axis, rather it is slider[0]. Since I have a game that doesn't recognize slider controls, I need a way to have slider[0] be reassigned/redirected/rerouted to the Z-axis. What's the easiest way to do this?
One problem I've discovered is that my throttle control isn't the z-axis, rather it is slider[0]. Since I have a game that doesn't recognize slider controls, I need a way to have slider[0] be reassigned/redirected/rerouted to the Z-axis. What's the easiest way to do this?
-
- Cross Eyed!
- Posts: 196
- Joined: Mon Mar 02, 2015 3:58 pm
Re: Axis redirection in FreePIE
Does the game allow for choosing different controllers (or picks up the defaut one selected in Game Controllers)? If so, you can use a virtual controller (such as vJoy or virtual XBOX controller) and assign the axes as you prefer. Note the differences in values, though.
-
- One Eyed Hopeful
- Posts: 5
- Joined: Mon Nov 14, 2016 8:02 pm
Re: Axis redirection in FreePIE
The game does pick up my X-45 (6-Axis, 24 buttons), but then it's the only controller connected for this game.
I also have vJoy installed as well, and have made a preliminary script, mostly for testing:
Tried it in the game, but z-axis still doesn't respond, even though I configured the first vJoy with z-axis.
I also have vJoy installed as well, and have made a preliminary script, mostly for testing:
Code: Select all
vJoy[0].x = joystick[0].x
vJoy[0].y = joystick[0].y
vJoy[0].rz = joystick[0].zRotation
vJoy[0].z = joystick[0].sliders[0]
diagnostics.watch(vJoy[0].x)
diagnostics.watch(vJoy[0].y)
diagnostics.watch(vJoy[0].z)
diagnostics.watch(vJoy[0].rz)
-
- Cross Eyed!
- Posts: 196
- Joined: Mon Mar 02, 2015 3:58 pm
Re: Axis redirection in FreePIE
The question is whether the game sees as the controller X45 or vJoy. If it is the former, then obviously it will not work. Try first controlling the vJoy with something else (e.g. mouse), while X45 is still connected. Then make sure the game is using vJoy and not X45.
-
- One Eyed Hopeful
- Posts: 5
- Joined: Mon Nov 14, 2016 8:02 pm
Re: Axis redirection in FreePIE
Nope, the game only sees the X-45 when it's plugged in, even when vJoy is selected as the default controller. vJoy does work with the mouse (except the buttons for some reason, already let them know about that), but as long as the X-45 is connected it's the controller seen and used.
I was hoping I can use the HOTAS throttle normally, but now it looks like I'll have to make it into some type of digital control instead (crud). BTW, the game is an old XP-era app gone open source called No Gravity (https://sourceforge.net/projects/nogravity/)
I was hoping I can use the HOTAS throttle normally, but now it looks like I'll have to make it into some type of digital control instead (crud). BTW, the game is an old XP-era app gone open source called No Gravity (https://sourceforge.net/projects/nogravity/)
-
- Cross Eyed!
- Posts: 196
- Joined: Mon Mar 02, 2015 3:58 pm
Re: Axis redirection in FreePIE
You can try loading the mouse vJoy script with x45 disconnected, when the game is started (and configured), and stop that and connect/load the x45-vJoy script when the game is already running. Some games only pick up the controller at the beginning/configuration and then communicate with it further on. Sadly, some games stop working at all when the controller input is stopped (been there, done that).
-
- One Eyed Hopeful
- Posts: 5
- Joined: Mon Nov 14, 2016 8:02 pm
Re: Axis redirection in FreePIE
... and now vJoy is going to be a dick by refusing to respond even though the axis worked earlier today. [Nuclear explosion from skull.jpg] Gonna have to put this on hold until I hear from vJoy about this latest fubar.
-
- Cross Eyed!
- Posts: 196
- Joined: Mon Mar 02, 2015 3:58 pm
Re: Axis redirection in FreePIE
When it does work you might want to check out this thread:
http://vjoystick.sourceforge.net/site/i ... ontrollers
They mention two utilities for reordering controllers that might help you.
http://vjoystick.sourceforge.net/site/i ... ontrollers
They mention two utilities for reordering controllers that might help you.
-
- One Eyed Hopeful
- Posts: 5
- Joined: Mon Nov 14, 2016 8:02 pm
Re: Axis redirection in FreePIE
Sorry about not getting back sooner, been having problems getting vJoy to work properly. But now everything's working.
I am also happy to report the axis-redirection script I made DOES work in "No Gravity". I just have to plug in my X-45 and start the script after the game loads to the main menu. Now all I need to do is get a deadzone worked into the rudder.
I am also happy to report the axis-redirection script I made DOES work in "No Gravity". I just have to plug in my X-45 and start the script after the game loads to the main menu. Now all I need to do is get a deadzone worked into the rudder.
-
- Cross Eyed!
- Posts: 196
- Joined: Mon Mar 02, 2015 3:58 pm
Re: Axis redirection in FreePIE
That's great!
The deadzone should be trivial: map the real axis to the virtual one, if its absolute value exceeds the threshold.
The deadzone should be trivial: map the real axis to the virtual one, if its absolute value exceeds the threshold.