Jump to content

how to assign pitch and roll to mouse?


fedaykin

Recommended Posts

So I recently discovered that it's possible to control planes in Flaming Cliffs 2 with the mouse. It works perfectly. By assigning mouse X and Y axes to pitch and roll and adjusting the sensitivity I am able to control the plane just like I do in FSX and the mouse is so precise the I don't even need to trim much anymore. With an Alt modifier I'm at the same time able to control the view with the mouse as well.

 

I happily fired up Black Shark and applied the same changes in the controls menu, hoping to finally get rid of my annoying rigid joystick which makes my hand hurt after an hour.

 

Alas, it didn't work. I did it exactly like in FC2. But in BS, the stick that controls pitch and roll doesn't...well, stick! I was able to get to the point where moving the mouse does move the stick in the cockpit, but to get it to point in one direction continuously I would have to constantly keep moving the mouse, which is not good. If I use the arrow keys, it works like intended, but assigning to the mouse axes doesn't.

 

How can I control the BS with the mouse like in FC2? Why doesn't it work the same way, even though it's practically the same engine, though a different version? I looked in the config files and compared with FC2's and everything seems to be the same, yet it won't work in BS. Can someone give me the magic config?

Link to comment
Share on other sites

No, that did nothing. Come on, there's so many people playing this game! I can't be the only one who wants to play with a mouse. Someone has to know how to do this! FC2 and BS are practically the same engine, what's the difference in the controls?

Link to comment
Share on other sites

i think that yes you're the only person playing an hardcore sim, with evry button mapped on the cockpit realistic Flight model etc etc ... with a .. MOUSE ?

:doh:

You're not making any sense. Simulation is just that -- simulation. Not the real thing. If I wanted total realism, I'd get a real pilot license. By the way, you're playing a hardcore flight sim without a HELMET?? That's heresy!

 

If anyone is wondering why I want mouse controls, I suggest you try FSX with a mouse. It's such a smooth experience, you'll never want to go back to your silly stick :joystick:.


Edited by fedaykin
Link to comment
Share on other sites

If anyone is wondering why I want mouse controls, I suggest you try FSX with a mouse. It's such a smooth experience, you'll never want to go back to your silly stick :joystick:.

 

Done that, and my TM Warthog HOTAS is WAY better for smoothness and precision. But that's just personal preference. :)

People fly with the strangest of equipment. Personally I have no idea how people decided that a WHEEL of all things, even if they renamed it to a "yoke" was a good idea to stick into an aircraft. I much prefer to control with a nice stick both in-sim and in-real.

 

What I will say though is that a quality mouse probably is indeed better than a crap joystick. I've seen "mass-market" sticks with such crappy precision you can't aim for a continent let alone fly finger with it. But go up a bit and you can get wonderful precision. I've actually been thinking about modding my HogStick with an extension to use a longer arm for even more precision. :)


Edited by EtherealN

[sIGPIC][/sIGPIC]

Daniel "EtherealN" Agorander | Даниэль "эфирныйн" Агорандер

Intel i7 2600K @ 4.4GHz, ASUS Sabertooth P67, 8GB Corsair Vengeance @ 1600MHz, ASUS GTX 560Ti DirectCU II 1GB, Samsung 830series 512GB SSD, Corsair AX850w, two BENQ screens and TM HOTAS Warthog

DCS: A-10C Warthog FAQ | DCS: P-51D FAQ | Remember to read the Forum Rules |

|
| Life of a Game Tester
Link to comment
Share on other sites

:doh:

You're not making any sense. Simulation is just that -- simulation. Not the real thing. If I wanted total realism, I'd get a real pilot license. By the way, you're playing a hardcore flight sim without a HELMET?? That's heresy!

 

If anyone is wondering why I want mouse controls, I suggest you try FSX with a mouse. It's such a smooth experience, you'll never want to go back to your silly stick :joystick:.

 

I suggest you to put you with a helmet and fly with a real plane :pilotfly:

Then , try to throw the helmet out .. , nothing happens ? right

Then throw the throttle and the stick out .. :helpsmilie:

Now, what seems you the most important to fly and the kinda-useless one ?

Link to comment
Share on other sites

Done that, and my TM Warthog HOTAS is WAY

better for smoothness and precision.

Unlikely, but whatever.

 

My joystick is actually quite precise and has a nice dual throttle. The trouble is that it's rigid, I have to apply quite a bit of force to move the stick because there's a big spring at the base and that makes my wrist hurt pretty quickly.

 

Aside from that, I play a lot of FPSs and keyboard & mouse is the most natural and quick control method for me.

I suggest you to put you with a helmet and fly with a real plane :pilotfly:

Then , try to throw the helmet out .. , nothing happens ? right

Then throw the throttle and the stick out .. :helpsmilie:

Now, what seems you the most important to fly and the kinda-useless one ?

Learn English. And get a helmet, otherwise you're a fake, not a "hardcore" flight simmer ;)

 

lol.gif

 

Now, back to the point. I'm still waiting for the real solution, but I've found a temporary work-around.

 

I made a virtual joystick with PPJoy and mapped it to the mouse. The down side is that if I want to control both view and pitch/roll with the mouse, I have to use both functions with modifiers, otherwise the view and pitch/roll will change simultaneously. Still better than a joystick.

Link to comment
Share on other sites

Sounds like controller conflict, however, there is at least one way you can accomplish what you want.

 

Go to . . .Config/Input/Aircrafts/Ka-50 folder. Backup the folder in case you screw something up.

 

You can attempt to modify your mouse.lua file (strongly suggest you use notepad++ for editing lua files) in the mouse folder to include the joy_x and joy_y axis. Axis commands are near the bottom of the file. You may want to open your (joystick_name).lua file in the joystick folder to copy the axis commands directly from that file. Note the .lua structure and numbering scheme. If you do it correctly, you will have the option of adding those axis within the in game GUI under your mouse axis. Most importantly, don't forget to remove any other conflicting key commands that would influence mouse movement or pitch and roll in your aircraft, otherwise, the rest state for mouse movement may not be the same as the rest state of a conflicting controller, i.e., you bank with mouse, but when you stop moving it, it reverts to the joystick state.

 

Smooth flying with a mouse? Ha! What are you doing? It might also help to smooth out that joystick experience as well, if you decide to go a tinkering.


Edited by S77th-ReOrdain
Link to comment
Share on other sites

Sounds like controller conflict, however, there is at least one way you can accomplish what you want.

 

Go to . . .Config/Input/Aircrafts/Ka-50 folder. Backup the folder in case you screw something up.

 

You can attempt to modify your mouse.lua file (strongly suggest you use notepad++ for editing lua files) in the mouse folder to include the joy_x and joy_y axis. Axis commands are near the bottom of the file. You may want to open your (joystick_name).lua file in the joystick folder to copy the axis commands directly from that file. Note the .lua structure and numbering scheme. If you do it correctly, you will have the option of adding those axis within the in game GUI under your mouse axis. Most importantly, don't forget to remove any other conflicting key commands that would influence mouse movement or pitch and roll in your aircraft, otherwise, the rest state for mouse movement may not be the same as the rest state of a conflicting controller, i.e., you bank with mouse, but when you stop moving it, it reverts to the joystick state.

 

Smooth flying with a mouse? Ha! What are you doing? It might also help to smooth out that joystick experience as well, if you decide to go a tinkering.

OK, interesting. But I need some clarification.

Do you mean that I should try that with PPJoy or without?

Do I have to first bind Joy_X and Joy_Y to roll and pitch before copypasting?

Link to comment
Share on other sites

No fancy binding necessery. You're just adding the normal joystick x and y axis to your mouse.lua file so that you can select these axes from the in game options screen under the controller tab.

 

Open the mouse.lua file and scroll down to the bottom. Axiscommands start on line 3198 if opening with notepad++. At the bottom of this section you want to add your additional joystick axes to the ones currently listed.

 

The last command is [10] in my file. You want to add commands [11] and [12] to the list.

 

Open your joystick.lua file in the joystick folder. Scroll to the bottom, copy Joy_X and Joy_y axis commands. Mine are listed as [1] and [2]. Be careful to follow the same lua structure and just paste the joystick commands to the bottom of the mouse.lua file. Renumber accordingly. Save the file. Go to ingame options, and select the new joy_x and joy_y axis under your mouse controller. Remove conflicts from your previous joystick axis settings.

 

If done correctly, you should now be good to go, and as smooth as your mouse curvature axis will allow.

Link to comment
Share on other sites

Unlikely, but whatever.

 

I'm telling you my personal experience. I have done what you do, though only in FSX. Unfortunately I suspect your PPJoy solution is the only real way with DCS products.

 

My joystick is actually quite precise and has a nice dual throttle. The trouble is that it's rigid, I have to apply quite a bit of force to move the stick because there's a big spring at the base and that makes my wrist hurt pretty quickly.

 

Well, if your stick is wrong for you, then it's a problem with that specific stick design and how it interacts with you, rather than sticks in general, IMO.

 

In my personal opinion, hving a good bit of resistance is absolutely necessary on a stick that has a short arm - IRL my stick has a longer arm (~30cm), which makes precision a definite piece of cake. For sims I used to use a Cyborg, which was so-so acceptable but the pots quickly started dying on me. I then switched to X52 which was pretty good - good enough precision to fly fingertip in a maneuvering formation and do passable contract turns of "feel", but it was so light to move that it was way too easy to "yank the stick", so to speak, and end up applying more force than you meant to.

 

HOGstick strikes a perfect balance for me. Rediculously precise hall sensors, and the force on the stick (and the metal weight of it) is such that I can control it precisely. The key to efficient flying is that you need to have a certain pressure on stick mean a certain amount of G being pulled, without referencing any instruments at all - this goes for Sim and IRL both in my experience, though IRL you are helped through actually feeling the G's as well. (Unless you fly something with a force-sensing stick, but I don't.)

 

Do definitely take such pains very very seriously though. I've recently been struggling with a bad case of RSI in my right hand from bad mouse handling (I used an ambidextrous mouse in a bad posture and it slaughters the wrist). If the problem persists it might be worth having it checked out, or experimenting with different seating arrangements to ensure you don't end up constantly loading your wrist. (Or, if your mouse works fine for you, just use that of course. :) But don't blame joysticks in general for it. ;) )

[sIGPIC][/sIGPIC]

Daniel "EtherealN" Agorander | Даниэль "эфирныйн" Агорандер

Intel i7 2600K @ 4.4GHz, ASUS Sabertooth P67, 8GB Corsair Vengeance @ 1600MHz, ASUS GTX 560Ti DirectCU II 1GB, Samsung 830series 512GB SSD, Corsair AX850w, two BENQ screens and TM HOTAS Warthog

DCS: A-10C Warthog FAQ | DCS: P-51D FAQ | Remember to read the Forum Rules |

|
| Life of a Game Tester
Link to comment
Share on other sites

No fancy binding necessery. You're just adding the normal joystick x and y axis to your mouse.lua file so that you can select these axes from the in game options screen under the controller tab.

 

Open the mouse.lua file and scroll down to the bottom. Axiscommands start on line 3198 if opening with notepad++. At the bottom of this section you want to add your additional joystick axes to the ones currently listed.

 

The last command is [10] in my file. You want to add commands [11] and [12] to the list.

 

Open your joystick.lua file in the joystick folder. Scroll to the bottom, copy Joy_X and Joy_y axis commands. Mine are listed as [1] and [2]. Be careful to follow the same lua structure and just paste the joystick commands to the bottom of the mouse.lua file. Renumber accordingly. Save the file. Go to ingame options, and select the new joy_x and joy_y axis under your mouse controller. Remove conflicts from your previous joystick axis settings.

 

If done correctly, you should now be good to go, and as smooth as your mouse curvature axis will allow.

Is this what you had in mind? This is axiscommands in my mouse.lua now:

   ["axisCommands"] = 
   {
       [1] = 
       {
           ["action"] = 2002,
           ["name"] = "Flight Control Cyclic Roll",
           ["category"] = "Axis Commands",
       }, -- end of [1]
       [2] = 
       {
           ["action"] = 2001,
           ["name"] = "Flight Control Cyclic Pitch",
           ["category"] = "Axis Commands",
       }, -- end of [2]
       [3] = 
       {
           ["action"] = 2003,
           ["name"] = "Flight Control Rudder",
           ["category"] = "Axis Commands",
       }, -- end of [3]
       [4] = 
       {
           ["action"] = 2004,
           ["name"] = "Flight Control Collective",
           ["category"] = "Axis Commands",
       }, -- end of [4]
       [5] = 
       {
           ["action"] = 2007,
           ["name"] = "Camera Horizontal View",
           ["category"] = "Axis Commands",
       }, -- end of [5]
       [6] = 
       {
           ["action"] = 2008,
           ["name"] = "Camera Vertical View",
           ["category"] = "Axis Commands",
       }, -- end of [6]
       [7] = 
       {
           ["action"] = 2009,
           ["name"] = "Camera Zoom View",
           ["category"] = "Axis Commands",
       }, -- end of [7]
       [8] = 
       {
           ["action"] = 2048,
           ["name"] = "Camera View Horizontal Shift",
           ["category"] = "Axis Commands",
       }, -- end of [8]
       [9] = 
       {
           ["action"] = 2050,
           ["name"] = "Camera View Vertical Shift",
           ["category"] = "Axis Commands",
       }, -- end of [9]
       [10] = 
       {
           ["action"] = 2052,
           ["name"] = "Camera View Longitude Shift",
           ["category"] = "Axis Commands",
       }, -- end of [10]
       [11] = 
       {
           ["combos"] = 
           {
               [1] = 
               {
                   ["key"] = "JOY_X",
                   ["reformers"] = 
                   {
                   }, -- end of ["reformers"]
               }, -- end of [1]
           }, -- end of ["combos"]
           ["action"] = 2002,
           ["name"] = "Flight Control Cyclic Roll",
           ["category"] = "Axis Commands",
       }, -- end of [1]
       [12] = 
       {
           ["combos"] = 
           {
               [1] = 
               {
                   ["key"] = "JOY_Y",
                   ["reformers"] = 
                   {
                   }, -- end of ["reformers"]
               }, -- end of [1]
           }, -- end of ["combos"]
           ["action"] = 2001,
           ["name"] = "Flight Control Cyclic Pitch",
           ["category"] = "Axis Commands",
       }, -- end of [2]
   }, -- end of ["axisCommands"]

What now?

Also, what is the "controller tab"? There is no such thing in my game (version 1.0.0.2). Do you mean the button with the label "controls"?

 

Unfortunately I suspect your PPJoy solution is the only real way with DCS products.

But it works fine without PPJoy in Flaming Cliffs 2! Why not in Black Shark?


Edited by fedaykin
Link to comment
Share on other sites

Yes, that looks correct.

 

Go in game, select Options,

Select Controls tab,

 

WARNING - Don't click Clear Category or it will wipe out all commands under the currently selected column.

 

Aircraft = Ka-50 Real, (or Game depending on the mouse.lua file you edited)

Select Axis Commands from the adjacent scroll down menu,

Slider bar to the right so that Mouse Category is visible,

Click box designating Flight Control Pitch under Mouse Category

Click Add

Under Axis key/button assignment box Select Joy Y and click OK

Do the same for Joy X under Flight Control Roll

 

At this point you should be able to select the new axes and tune them by selecting Axis Tune and adjusting your curve as necessary.

 

Disclaimer: I've not tested this with a mouse, but I have successfully added external TrackIR view control.

Link to comment
Share on other sites

Hmmm what puzzles me is despite the overall undeniable superiority of a mouse as a flight controler (...). How will you be able to click the cockpit or look around now (without TIR)?

 

I would rather modify the stick if it's too stiff for you.

 

As for the wrist pain I got this because of work a while back, don't fool around with this. A mouse is also a good way to screw your tendons. If you get this often, and more importantly, if it doesn't stops, consult a doctor and get an anti-inflamation prescription. Also take breaks and stop playing for a while if it persists. If you NEED to continue using the computer, ice and cold water along with frequent breaks do wonders. If you have a bad work/play environment you can seriously screw up your back and hands. If you ignore the pain you can end up under the scalpel or 6 months (or more) without being able to use your hands.

 

Now you know and knowing is half the battle... GIJOE!

Link to comment
Share on other sites

Yes, that looks correct.

 

Go in game, select Options,

Select Controls tab,

 

WARNING - Don't click Clear Category or it will wipe out all commands under the currently selected column.

 

Aircraft = Ka-50 Real, (or Game depending on the mouse.lua file you edited)

Select Axis Commands from the adjacent scroll down menu,

Slider bar to the right so that Mouse Category is visible,

Click box designating Flight Control Pitch under Mouse Category

Click Add

Under Axis key/button assignment box Select Joy Y and click OK

Do the same for Joy X under Flight Control Roll

 

At this point you should be able to select the new axes and tune them by selecting Axis Tune and adjusting your curve as necessary.

Like this?

http://img153.imageshack.us/img153/186/unledwbn.jpg

 

This does absolutely nothing, the cyclic won't move at all, in the axis tune and in the game. Also, I couldn't select the joy axes from the key/button assignment box in the mouse category, but the joy axes were already assigned like this when I started the game after editing.

Disclaimer: I've not tested this with a mouse, but I have successfully added external TrackIR view control.

Well, this explains why it won't work. You were trying to do something totally different. I don't have trackir. Or maybe I'm doing it wrong after all.

 

Thanks anyway.

Hmmm what puzzles me is despite the overall undeniable superiority of a mouse as a flight controler (...). How will you be able to click the cockpit or look around now (without TIR)?

By also assigning the mouse axes to the camera view controls with a modifier (alt or space, for example). Works perfectly in Flaming Cliffs 2:

http://img11.imageshack.us/img11/1681/unled2hz.png

I don't see any good reason why this shouldn't work in BS or A-10.

 

FSX has a similar setup.

I would rather modify the stick if it's too stiff for you.

I would rather use the mouse, as you have no doubt understood after reading my posts. noexpression.gif

As for the wrist pain I got this because of work a while back, don't fool around with this. A mouse is also a good way to screw your tendons.

I have used a mouse for over 10 years. I spend a lot of time behind the computer. Not a single time have I ever experienced any sort of wrist or arm pain from using mice. Joysticks, on the other HAND.......biggrin.gif

 

I do take the pain seriously and that's why I haven't spent as much time playing DCS simulators as I would like to. When I think of the game I think "wow, I'm gonna install it now!". When I think of the fact that I have to use a joystick, I slowly start to reconsider. That's why I was so happy when I discovered that mouse pitch/roll are possible in FC2.

 

 

 

Also, I'd like to say to whoever's spamming me with bad rep because I want to use a stick: grow the **** up.


Edited by fedaykin
Link to comment
Share on other sites

  • 1 year later...

I am posting this here as it is sort of relevant....

Once you have your pitch and roll, you'll want to toggle it to perform in-cockpit view, pan & scan, etc

To bind a mouse key to a normal keyboard function, use this example...

 

SOLVED: DCS World (Ka50 Black Shark 2)

Clickable mouse cockpit mode On/Off -- LAlt + C

 

Mouse.LUA

function layout()
return {


keyCommands = {


{combos = {{key = "MOUSE_BTN3"}, }, 
down = iCommandViewTransposeModeOn, 
up = iCommandViewTransposeModeOff, 
name = "Camera transpose mode on/off", 
category = "View Cockpit"
},


{combos = {{key = "MOUSE_BTN4"}, }, 
pressed = iCommandCockpitClickModeOnOff, 
down = iCommandCockpitClickModeOnOff, 
up = iCommandCockpitClickModeOnOff, 
name = "Clickable mouse cockpit mode On/Off", 
category = "General"},


},


axisCommands = {

{combos = {{key = "MOUSE_X"}, }, 
action = iCommandPlaneViewHorizontal, 
name = "Camera Horizontal View"},

{combos = {{key = "MOUSE_Y"}, }, 
action = iCommandPlaneViewVertical, 
name = "Camera Vertical View"},

{combos = {{key = "MOUSE_Z"}, }, 
action = iCommandPlaneZoomView, 
name = "Camera Zoom View"},


},


}
end

I set all three modes - Presssed, Down & Up ('Action' I assume is the mouse motion, so I left it off) and it worked a treat.

 

(Sidewinder Mouse on Win 64bit)

 

thumbup.gif


Edited by Palyarmerc
Link to comment
Share on other sites

So did anyone get it to work ?

After realising that the tracking system in an MSFFB is essentially a mouse reader, I was thinking that a simple way to read the movents from a home made joystick for the Ka-50 could be use a mouse reading a segment of a sphere with the shere's center at the pivot point of the joystick, or the stick moving a mouse sensor over a plate (or Huey, not so much planes..) .

As well as mice being cheap, accessible, sensitive and easy to hook up, they have no moving parts and so have nothing to wear or break, and open up a lot of different approaches to construction, FFB & trimming for helicopters.

Not sure about how stable their center point is though...

Cheers.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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