Jump to content
TheHarvesteR

A fix for Full Axis throttle mapping

Recommended Posts

@Scrub: Go * yourself. I'm not your customer and I don't give a slimy **** what you think. I also didn't call this an emergency. If you're going to start with direct insults then you can go masturbate with a cheese grater.

@TheHarvesteR: I don't care why your workaround is here. This product has a bug which should be fixed. I'm tired of paying for software that I then have to beta-test AND provide fixes on my own.

Consider the stupidity of having this kind of bug in 2010 in the first place. Now consider that it hasn't been fixed yet, and that it has no known ETA for a fix. It's their goddamn game to patch and fix, not ours.

I should not need, and refuse to install 3rd party software just to fix a product I paid for with a bug that should never have existed in the first place. Maybe BIS should focus less on releasing new content and a little more on fixing what they've already sold.

Share this post


Link to post
Share on other sites
@Scrub: Go * yourself. I'm not your customer and I don't give a slimy **** what you think. I also didn't call this an emergency. If you're going to start with direct insults then you can go masturbate with a cheese grater.

Show some respect to your fellow forum members before you find yourself on the fast track out of here.

I should not need, and refuse to install 3rd party software just to fix a product I paid for with a bug that should never have existed in the first place.

Then why exactly are you throwing a temper tantrum in a thread for just such 3rd party software?

Share this post


Link to post
Share on other sites

@Zipper5:

Wow. Self-important jerk much?

Enough said on that note, I presume. Check a few posts back if not.

I'm posting in this thread because this is where I found the details of what this bug is. TheHarvesteR says this is a solution, whereas I say this solution shouldn't be necessary.

Not that I need to explain my reasons.

Share this post


Link to post
Share on other sites

ppjoy link gives me an empty zip file. could anyone please point to a working download solution - my googling didn't help either.

edit found a working link. http://www.megaupload.com/?d=US4CQ0TS

and i wonder if you could answer/help me technicaly. see i have 2 joysticks - the x52 throttle and logitech EXTREME 3D PRO!!! for my cheap but working joystick control. i have setup it as PPJoy#.analog3 = (MapRange(-Joystick.slider, -1, 1, 0, 1))

but when i go to the gamecontroller panel i get no input. how can i solve this?

edit 2 - solved by changing joystick.z to joystick2.z so as to get input from my 2nd joystick.

PPJoy3.analog2 = (MapRange(-Joystick2.z, -1, 1, 0, 1))

thanks

Edited by twisted

Share this post


Link to post
Share on other sites

Yeah, that link I posted sometimes becomes dead... not sure why..

Thanks for posting that link. I'll add it to the front page as an alternative in case other people can't download as well.

Glad to hear you've solved your issue with multiple joysticks. The joystick2 solution is exactly what I would have suggested. :)

I'm posting in this thread because this is where I found the details of what this bug is.

The thing here is, this issue isn't a bug. By definition, a bug is something that causes unwanted or unexpected behaviour. The half-axis issue is neither... It's more of a design flaw, if you must give it a label... (I mean, you ARE able to map your joystick... A bug would be something that prevented you from doing so)

The ArmA devs are quite up to their elbows with things that really are bugs, and are likely to disrupt gameplay for some. That is a much higher priority than fixing up a petty little detail like this. (Or would you rather have your axes fixed, and the game blue screening on you?)

Cheers

Share this post


Link to post
Share on other sites

I haven't tried your fix yet but is it possible to set this up for the flightstick too?

I have a Saitek X52 and I don't know how to properly set it up, currently it works like the keyboard, if I bank left in order to turn the aircraft it keeps banking even after returning the stick to the center position, the only way to return the aircraft to horizontal position is to bank all the way to the right, this feels unnatural and makes flying pretty hard.

Share this post


Link to post
Share on other sites
I haven't tried your fix yet but is it possible to set this up for the flightstick too?

I have a Saitek X52 and I don't know how to properly set it up, currently it works like the keyboard, if I bank left in order to turn the aircraft it keeps banking even after returning the stick to the center position, the only way to return the aircraft to horizontal position is to bank all the way to the right, this feels unnatural and makes flying pretty hard.

You must have a huge deadzone in either Arma settings or Your saitek software, I'd reset both to default and start again

Share this post


Link to post
Share on other sites

Ok I tried the fix and it works flawlessly now I can actually use the throttle properly, thanks!

You must have a huge deadzone in either Arma settings or Your saitek software, I'd reset both to default and start again

The deadzones are OK in the Saitek settings, I can't find any deadzone options in ArmA2 though.

Right now it seems like the game handles the joystick like the arrow or WASD keys. If I pitch forward and release the joystick returning it to the center position nothing happens the chopper is stuck in the same angle.

Edited by BlackLord

Share this post


Link to post
Share on other sites
ppjoy link gives me an empty zip file. could anyone please point to a working download solution - my googling didn't help either.

edit found a working link. http://www.megaupload.com/?d=US4CQ0TS

and i wonder if you could answer/help me technicaly. see i have 2 joysticks - the x52 throttle and logitech EXTREME 3D PRO!!! for my cheap but working joystick control. i have setup it as PPJoy#.analog3 = (MapRange(-Joystick.slider, -1, 1, 0, 1))

but when i go to the gamecontroller panel i get no input. how can i solve this?

edit 2 - solved by changing joystick.z to joystick2.z so as to get input from my 2nd joystick.

PPJoy3.analog2 = (MapRange(-Joystick2.z, -1, 1, 0, 1))

thanks

Installed the download from your link there and AVG found 2 trojans. Does this program usually set off antivirus software?

Share this post


Link to post
Share on other sites
Installed the download from your link there and AVG found 2 trojans. Does this program usually set off antivirus software?

not for me, but i use microsoft security essentials. source was the author of the software (you'll see the link on his comment section) and it's unlikely he'd sabotage his own software but everything is possible.

Share this post


Link to post
Share on other sites

Donno.

AVG found Trojan horse Downloader.Agent2.AGHD and Agent2.AAYR in objects PPJoyMouse.exe and PPJoyDLL.exe

I sent them to quarantine and got the fix to work anyway so :thumbs-up:

Share this post


Link to post
Share on other sites

AVG sometimes gives false alarms with this kind of software... I wouldn't worry about it ;)

PPJoy does some memory manipulations that AVG doesn't really approve... It's not malicious, and I guarantee PPJoy will not hurt your computer (unless you mess up the instalation somehow... but then again, that wouldn't be the software's fault ;) )

Glad to hear my fix is helping people out. :)

I haven't tried your fix yet but is it possible to set this up for the flightstick too?

I have a Saitek X52 and I don't know how to properly set it up, currently it works like the keyboard, if I bank left in order to turn the aircraft it keeps banking even after returning the stick to the center position, the only way to return the aircraft to horizontal position is to bank all the way to the right, this feels unnatural and makes flying pretty hard.

If you're still having this issue, one possibility is that you might have your command mapping set to 'turn left/right'... this is a simplistic mapping that controls both ailerons and rudder at the same time, and I don't recommend using it with a joystick (it was probably meant for keyboard use)... I would suggest you map your X axis to the 'bank left/right' actions, and your rudder (twist grip or pedals) into the 'pedal left/right' actions.

Cheers

Edited by TheHarvesteR

Share this post


Link to post
Share on other sites

Harvester what do you think about my issue?

Flying choppers with joystick is hard because they do not act like as helicopters should, they do not stop pitching/banking even if the joystick is released and returned to the center position. The only way to even out the helicopter is to manually compensate by pulling the joystick to the opposite direction, it's like they do not have a gyroscope or what.

Is it somehow possible to emulate proper function with GlovePIE and PPjoy?

In order to better understand the issue let's use an everyday example:

You turn the steering wheel of your car to the left and the front wheels will turn left, now if you move the steering wheel back to the center position the wheel's are also going to turn back to the center position and point forward.

This is how pitching/banking should work in a helicopter.

Now imagine you are sitting in a special ArmA2 car:

You turn the steering wheel of your car to the left and the front wheels will turn left as expected, now if you move the steering wheel to the center position the wheel's WON'T BUDGE, they will be still turned left and the only way to return them to the center and point them forward again is to steer right. I bet it would be hard to drive a car like that.

This is how pitching/banking works right now in helicopters in ArmA2.

Edited by BlackLord

Share this post


Link to post
Share on other sites

Flying choppers with joystick is hard because they do not act like as helicopters should, they do not stop pitching/banking even if the joystick is released and returned to the center position. The only way to even out the helicopter is to manually compensate by pulling the joystick to the opposite direction, it's like they do not have a gyroscope or what.

oh really? that's interesting and i suppose would make hovering much easier.

Share this post


Link to post
Share on other sites
oh really? that's interesting and i suppose would make hovering much easier.

Well correct me if I'm wrong but I believe that's how it should work.

Share this post


Link to post
Share on other sites

That's not how helicopters handle in reality... The ArmA flight model is quite good actually (for a game that allows you to drive so many other vehicles).

Flying helicopters has less to do with driving a car than it has with balancing a stick on the palm of your hand. Constant input is needed to maintain a perfect hover (unless you're flying a SeaKing, which has hover autopilot).

Suppose you bank a little to the left... You are deflecting you lift from vertical a little bit to the side, so that this deflected force is pushing on your helicopter.

This makes it accelerate laterally. Now suppose you're quite satisfied with your lateral speed now, and you just want to keep that speed... You bank it back to almost vertical, leaving just enough tilt to overcome deceleration by air resistance.

So, what this means is, that in a helicopter, releasing input (or pitching/banking back to a neutral attitude), will not cause you chopper to return to a standstill. The helicopter will maintain any velocity it had before you neutralled it, decelerating only by air resistance. This also applies to any angular velocity you had (like pitching or rolling too hard).

Now, suppose you really want you left-moving heli to come to a standstill... you now need to counter that velocity by banking right a bit, thus deflecting some of your lift to the opposite side, which causes it to accelerate in the opposite direction, thereby decelerating it's leftward movement.

This is just an over-simplified example of how forces act on a helicopter... In real life (or even in ArmA) you have to compensate for various other aerodynamical effects, like weathervaning (the tendency to turn your nose into your velocity direction), torque and so on...

Applying input in ArmA does just what it should do in real life... it simply tilts the helicopter so that it diverts some vertical lift into lateral or longitudinal thrust. That's how helicopters fly.

In a car, releasing the wheel (or returning it to center) will in fact stop it from turning... but that's because a car, being stuck to the ground, has other forces acting on it, such as friction from the road surface.

Now, if you're really looking for a hover autopilot, GlovePIE might not be the best option for that, since there's no way of knowing (from inside GlovePIE) what's going on in the game... To program an autopilot you'd have to somehow get flight information like airspeed and attitude into whatever will process your flying, and, short of writing an addon, I don't see how one could get those values out of the game...

Hope this helps :)

Cheers

Edited by TheHarvesteR

Share this post


Link to post
Share on other sites

I don't want a constant auto hover function which forces the helicopter to hover.

In Black Shark unless I engage the trimming I have to constantly tilt the cyclic to move into a certain direction.

Let's say I'm hovering and want to move forward.

To do this I tilt the cyclic forward and the helicopter pitches forward the nose also tilts downward in an angle depending on how much I tilt the cyclic.

Now I find this angle too steep so I retract the cyclic slightly towards the center position and the helicopter's nose 'follows' this movement and moves up towards the horizontal position, I don't expect the helicopter to stop and start hovering of course, it will still pitch forward only in a less steep angle.

If I find this attitude satisfying I engage the trimming and return the joystick to it's center position.

In ArmA2 most people prefer mouse control in helicopters because the mouse does what I just described.

Place your mouse in the middle of your mouse pad (let's say this is the center position of the cyclic) now move the mouse forward and the helicopter starts pitching forward, now pull the mouse back towards the center position and the helicopter follows the movement, the nose moves up towards the horizontal position. This allows the pilot to make slight corrections swiftly which is useful in low level, high speed flight and landing on tight LZs.

Edited by BlackLord

Share this post


Link to post
Share on other sites

I think I get what you're saying now... sorry if I didn't catch your meaning before...

So you want your chopper to return to a neutral attitude as you return the stick to center... If I'm not mistaken, ArmA's choppers don't have that kind of self stabilization... if you bank, you must un-bank with opposite input... Most flight sim helicopters handle this way... it's quite possible that BlackShark handles differently... I can't help you there as I've never played it..

Anyways, In this case it might actually be possible to jury rig something using GlovePIE

Instead of just relaying the translated input to ArmA, you could program GlovePIE to feed it a fake input based on the stick's rate of movement, instead of it's absolute position, though... But you would need a button to 'recenter' your fake input to simulate trimming, and recenter it when it becomes miscalibrated... Hmm...

This fake input is already there in fact... that's what PPJoy does... the thing would be making the PPJoy output respond not to the stick's position, but the stick's movement...

Suppose you pitch forward... GlovePIE is checking on each frame to see if the stick's position is the same as it was before... once you pitch forward, GlovePIE will detect that, at some point, the stick's position was different than last time, meaning it moved...

knowing your actual stick position and you previous stick position means you could calculate the stick's speed. Do some multiplying to adjust input sensitivity, and assign that value to PPJoy.

This should work because if you pitch forward, PPjoy will tell arma to pitch, but once you stop moving the stick, the input in ArmA will be neutral. Now, as you release the stick back to neutral again, the input in ArmA would be an opposite input, hopefully of the same magnitude, so that the effect is that of returning to a neutral attitude.

Now, there are no guarantees that you heli will always return to a neutral attitude... that' why you should always have a 'trim' button, to zero out PPJoy's stick position, regardless of where your stick is... and the sensitivity value will have to be carefully calibrated so you get decent results...

Well, this is what I would try to do in your case... I hope it works (or at least makes sense ;) )

Best of luck!

Cheers

Edited by TheHarvesteR

Share this post


Link to post
Share on other sites

Here's a snippet of how you can grab the joystick speed, by reading it's actual position and it's previous frame position:

var.deltaX = Joystick.x - var.lastX

var.lastX = Joystick.x

var.deltaY = Joystick.y - var.lastY

var.lastY = Joystick.y

PPjoy1.x = var.deltaX * 10.0 // the multiplier is your sensitivity adjustment

PPjoy1.y = var.deltaY * 10.0 // the multiplier is your sensitivity adjustment

Note that we don't have explitic values for the previous frame positions anywhere... The last frame position is simply the current frame position, but what makes the difference is that we are storing it AFTER we calculate the deltas, why? because the variables will retain it's value, and when the script reaches the delta line again, the lastX/lastY variables will have the values from the previous cycle.

Then we multiply the deltas by a constant, which is your sensitivity adjustment.. It doesn't need to be 10.0... actually, chances are that you will need to tune this until you find good values that work for you... too much and your heli becomes uncontrollable... too little and you won't have enough input...

Well, you can try it... and see how it goes :)

Hope this helps

Cheers

Share this post


Link to post
Share on other sites

Thanks for the script. Now the helicopter returns to neutral attitude but I have two issues.

1.

Even if I tilt the joystick all the way to a certain direction the helicopter will only tilt in a slight angle, so I can't perform steep turns because I can't roll the helicopter to it's side.

2.

You have mentioned this but the center position indeed becomes dislocated after a while.

Share this post


Link to post
Share on other sites

Hey,

Not having any luck with this. I have PPJoy running and in it I see "Configured joysticks" and under that is PPJoy Virtual Joystick 3 - that is it. Then in GlovePIE I have:

debug = Joystick.Z

PPJoy3.analog2 = (MapRange(-Joystick.z, -1, 1, 0, 1))

And inside A:OC I can see PPJoy listed as an option for Thrust (Analog) and I set it for that... and then nothing. I move the throttle up and down and get absolutely nothing happening.

Thoughts? The joystick is X52 Pro.

Thanks.

Share this post


Link to post
Share on other sites

@11F:

PPjoy created a device called virtual joystick 3? That means you have some other device that isn't your X52 plugged in as well...

Open up your joystick properties (Start->Run->type joy.cpl), go into your ppjoy device's properties, and see if any axes are moving when you move your throttle...

If not, you are either assigning to a ppjoy device that doesn't exist, or you're reading from a device that isn't the one you're looking for...

As I said before, the trickiest part of this whole thing is that the device numbers are different for each user, so you have to find which device is which in your computer...

You have a debug line there already set for your throttle axis... run the script in glovePIE and see if the number changes (in the debug bar just above the script)... If not, you've found your problem.

Try reading off joystick1.Z or joystick2.z instead of just Joystick.z... see if that changes anything...

Also, try writing to PPjoy1 or 2, see if that makes a difference...

Well, that's pretty much all I can tell you... let me know if you got any questions :)

Hope this helps

Cheers

Share this post


Link to post
Share on other sites

I can't get ppjoy to install. Even though I've got "test mode" running, the installer still throws a hissy fit about test mode and tells me to enable it, or tries to (and fails, because i have to specify the bcd store) do it itself, then tells me to reboot and try again.

if I just open the installer in 7zip, it's a big nasty pile and I'd have no clue how to install it myself.

Anyone gotten 'ppjoysetup-0-8-4-6.exe' to install on Windows 7 64-bit?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×