#61 2016-04-27 03:22:03

bud
maestro
Reputation: +1835
Location: shangri la
Registered: 2012-07-07
Posts: 3,941
Website
Windows 7 Firefox 45.0

Re: Mouse bug fix

Sonic wrote:
Sonic wrote:

Is it possible to add a command which will enable mouse invert only when L .shift is pressed? This might solve the bug!

Something like this:

ControlMap.addKeyToTriggerMapping c_PIMouseLook IDFKeyboard IDKey_LeftShift c_CMPushAndHold
ControlMap.addKeyToTriggerMapping c_PIgame.setAirMouseInvert 1 IDFKeyboard IDKey_LeftShift c_CMPushAndHold


????


Somehow these commands just add only permanent horizontal inversion. Shit this isn't as easy as I thought big_smile

I found whats causing your problem, its not a bug per se but more a "no option" in the code thing. I belive i can help you but i need to do some testing first.

Offline

    Positive reputation 0   Negative reputation 0

#62 2016-04-27 08:22:38

Serebro
Reputation: +1000
Location: Moldova
Registered: 2014-03-28
Posts: 2,612
Android Chrome 49.0

Re: Mouse bug fix

Ok bud, that'd be great. I just spent 2-3 hours last night and nothing. The most shitty thing is that everything seemed logic and in didn't work :\

Last edited by Serebro (2016-04-27 08:23:11)

Offline

    Positive reputation 0   Negative reputation 0

#63 2016-04-27 23:53:18

bud
maestro
Reputation: +1835
Location: shangri la
Registered: 2012-07-07
Posts: 3,941
Website
Windows 7 Firefox 45.0

Re: Mouse bug fix

Okay so i gave it a quick shot and had no luck, i will try some ideas when i get my thumb out but in the meantime ill show you the problem and maybe someone can figure out a solution.

The problem is that flaps and wings is controlled by one set of settings, but then you have the camera and its controlled by a different set of settings

Alright, mouse control for flaps and wings

ControlMap.addAxisToAxisMapping c_PIPitch IDFMouse IDAxis_1 0
ControlMap.addAxisToAxisMapping c_PIPitch IDFMouse IDAxis_2 0 1
ControlMap.addAxisToAxisMapping c_PIRoll IDFMouse IDAxis_0 0

game.setAirMouseInvert 1 <-------  this affect only the settings above

And then we have the controls that affect the camera

 ControlMap.addAxisToAxisMapping c_PIMouseLookX IDFMouse IDAxis_0 0
ControlMap.addAxisToAxisMapping c_PIMouseLookY IDFMouse IDAxis_1 0 

code piece from plane to show how the input is hooked up

rem *** ZeroFlapTailLeft ***
ObjectTemplate.create Wing ZeroFlapTailLeft
ObjectTemplate.setInputToPitch c_PIPitch


rem *** ZeroCamera ***
ObjectTemplate.create Camera ZeroCamera
ObjectTemplate.setInputToYaw c_PIMouseLookX
ObjectTemplate.setInputToPitch c_PIMouseLookY

I tried hook up the camera to the same input as the wings but didnt work, fibbled around some with the _2 0 1 figures but that just made it worse smile

Last edited by bud (2016-04-27 23:57:16)

Offline

    Positive reputation 0   Negative reputation 0

#64 2016-04-28 13:16:18

Arkos
Sedmin
Switzerland
Reputation: +2778
Registered: 2014-06-06
Posts: 7,041
Windows 7 Chrome 50.0

Re: Mouse bug fix

...

Dude, you have real staying power...

How about to start from the beginning. The question is if the string for ShiftView is reverseable somewhere else, then in air.con. (As Bud allready said).

(Besides, when i changed something with wordpad, it didn't stay. I had to change things via notepad, (that it keeps the format), otherwise all was overwritten after the first start of the game.)

...

Last edited by Arkos (2016-04-28 13:17:24)

Offline

    Positive reputation 1   Negative reputation 0

#65 2016-04-28 14:42:19

Serebro
Reputation: +1000
Location: Moldova
Registered: 2014-03-28
Posts: 2,612
iOS Safari 7.0

Re: Mouse bug fix

Thats why after changing i made it write protected. Then after launching the game I went to my docs and made the other air.con write protected too.

Offline

    Positive reputation 0   Negative reputation 0

#66 2016-04-28 21:27:58

Arkos
Sedmin
Switzerland
Reputation: +2778
Registered: 2014-06-06
Posts: 7,041
Windows 7 Chrome 50.0

Re: Mouse bug fix

...

But even with write protection there's a chance that the entire file will be replaced by the air.con from default profil. If you don't want that this happends, make your changes in notepad. It's a bit harder to find the strings, but like this the changes stay, until those don't corrupt the game, otherwise the file get's replaced again by the one from default profil in my opinion.

Perhaps i'm wrong, ... but you will find it out for sure.

...

Last edited by Arkos (2016-04-28 21:32:21)

Offline

    Positive reputation 1   Negative reputation 0

#67 2016-04-29 10:20:38

Russ
Jack-of-all-trades
United States
Reputation: +136
Registered: 2015-06-25
Posts: 390
Ubuntu Chromium 50.0

Re: Mouse bug fix

Ok, so this is the format:

ControlMap.addAxisToAxisMapping         <action> <device> <axis> <invert 0/1> [<idx>]

Not only is game.setAirMouseInvert redundant and confusing, but BF1942 seems to also like to flip the sign on game.setAirMouseSensitivity which also inverts things in new and exciting ways. If you are setting your files readonly, set game.setAirMouseInvert to 0 and set game.setAirMouseSensitivity to a positive number.

If you want pushing the mouse up to make the plane go up, pushing the mouse left to make it roll left, pushing the mouse up to look up, and pushing the mouse left to look left:

ControlMap.addAxisToAxisMapping c_PIRoll IDFMouse IDAxis_0 0
ControlMap.addAxisToAxisMapping c_PIPitch IDFMouse IDAxis_1 0
ControlMap.addAxisToAxisMapping c_PIMouseLookX IDFMouse IDAxis_0 0
ControlMap.addAxisToAxisMapping c_PIMouseLookY IDFMouse IDAxis_1 1

If you want to invert pitch so pushing the mouse up causes the plane to go down:


ControlMap.addAxisToAxisMapping c_PIRoll IDFMouse IDAxis_0 0
ControlMap.addAxisToAxisMapping c_PIPitch IDFMouse IDAxis_1 1
ControlMap.addAxisToAxisMapping c_PIMouseLookX IDFMouse IDAxis_0 0
ControlMap.addAxisToAxisMapping c_PIMouseLookY IDFMouse IDAxis_1 1

I don't know why the mouselook axis is inverted in planes, but it is. It was probably some hack for fixing mouse look when using inverted controls. What really drives me nutty is:

ControlMap.addAxisToAxisMapping c_PIMouseLookX IDFGameController_0 IDAxis_0 0
ControlMap.addAxisToAxisMapping c_PIMouseLookY IDFGameController_0 IDAxis_1 1

Does not create something where the joystick position corresponds to the looking position. It creates something where the further you move the joystick, the faster it slews.

Offline

    Positive reputation 3   Negative reputation 0

#68 2016-05-05 01:05:23

bud
maestro
Reputation: +1835
Location: shangri la
Registered: 2012-07-07
Posts: 3,941
Website
Windows 7 Firefox 45.0

Re: Mouse bug fix

Russ wrote:

Ok, so this is the format:

ControlMap.addAxisToAxisMapping         <action> <device> <axis> <invert 0/1> [<idx>]

Thanks Russ. for some reason i just couldnt find this info when i googled around. Did you get it to work as you want Sonic?

Offline

    Positive reputation 0   Negative reputation 0

#69 2016-05-05 10:27:00

Serebro
Reputation: +1000
Location: Moldova
Registered: 2014-03-28
Posts: 2,612
Windows 7 Chrome 50.0

Re: Mouse bug fix

Ok, so I tested Russ'es config.
image.jpg

Mouse became inverted for piloting.
Drag mouse to myself ->nose of plane goes up and viceversa.

And cockpit view changed.
Drag mouse to me crosshair goes down.
Mouse from me ->crosshair  goes up.
BUT drag mouse to left >goes right and viceversa.

SO mouse just became inverted and with added horizontal cockpit inversion.


THEN I entered my Doc's and made same changes to the air.con file there and made it read only too.
Mouse became stock again, as it was before any customisations. (inversion off and cockpit view is vertically inverted)

image.jpg


Problem unsolved sad

Last edited by Serebro (2016-05-05 10:30:34)

Offline

    Positive reputation 0   Negative reputation 0

#70 2016-05-05 12:20:17

Russ
Jack-of-all-trades
United States
Reputation: +136
Registered: 2015-06-25
Posts: 390
Ubuntu Chromium 50.0

Re: Mouse bug fix

Is it just me, or are two screenshots of the same config?

First of all, you forgot to invert your mouselook y axis:

ControlMap.addAxisToAxisMapping c_PIMouseLookY IDFMouse IDAxis_1 1

Second, if you have horizontal inversion, it's a symptom of mouse sensitivity being negative. Since I don't see it being negative in the config file you are showing us, it's likely that BF1942 has created another Air.con and is using that one. It tends to do this when you set the file to readonly. Easiest thing to do is just search your whole computer for Air.con. I've seen it create them under a map specific folder under the BF1942 directory and I've also seen them under one of the paths in your user folder (\Users\Sonic, etc).

The other thing of course is that if you aren't setting it read-only it'll override it pretty much as soon as you run 1942.

I've testing these settings, it does work.

Offline

    Positive reputation 1   Negative reputation 0

#71 2016-05-05 13:48:46

Serebro
Reputation: +1000
Location: Moldova
Registered: 2014-03-28
Posts: 2,612
Windows 7 Chrome 50.0

Re: Mouse bug fix

Yes, my bad, I missed that string... tongue

NOW IT's ALIVEEE!!!!
0928_frankenstein_moon_full_600.jpg
-----------------------------------------
Thanks Russ!!! It all works now!

Last edited by Serebro (2016-05-05 13:50:45)

Offline

    Positive reputation 1   Negative reputation 0

#72 2016-05-09 00:48:45

Arkos
Sedmin
Switzerland
Reputation: +2778
Registered: 2014-06-06
Posts: 7,041
Windows 7 Chrome 50.0

Re: Mouse bug fix

...

Don't tell me we didn't see the forest because of all these trees!!!

...

Offline

    Positive reputation 0   Negative reputation 0

#73 2016-05-09 10:24:57

Serebro
Reputation: +1000
Location: Moldova
Registered: 2014-03-28
Posts: 2,612
Windows 7 Chrome 50.0

Re: Mouse bug fix

Arkos wrote:

...

Don't tell me we didn't see the forest because of all these trees!!!

...

Nice proverb, I'll keep it tongue

Offline

    Positive reputation 0   Negative reputation 0

Board footer