Jump to content

T.A.R.G.E.T max/ max values of axis


Recommended Posts

Hi,

 

I'm trying to figure out how to plit my right throttle of my warthog into two different axis, so when the right throttle is between 0 (top) and the middle, it puts values into an axis, and the same for bottom half.

 

But can't figure out what values to put into the DXSetAxis. Unsure what the min / max values are for axis.

 

Just to test my little script looks like that :

 

include "target.tmh"

int main()
{
   if(Init(&EventHandle)) return 1;

   MapAxis(&Throttle, THR_RIGHT, DX_ZROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
   MapAxis(&Throttle, THR_LEFT, DX_XROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
   MapAxis(&Throttle, THR_FC, DX_YROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
}

int EventHandle(int type, alias o, int x)
{
   if(&o == &Throttle & x == THR_RIGHT & Throttle[THR_RIGHT] < 8192)
   {
       GetAxisData(&o, x);
       DXSetAxis(DX_XROT_AXIS, 0);
   }

   if(&o == &Throttle & x == THR_RIGHT & Throttle[THR_RIGHT] >= 8192)
   {
       GetAxisData(&o, x);
       DXSetAxis(DX_XROT_AXIS, 16383);
   }

DefaultMapping(&o, x);
}

 

I know the value I put is weird. Still trying to figure out what formula to put there... this function was just to test, I believed 0 and 16383 were also the min/max value of DX_XROT_AXIS as this is the min/max of the DX_ZROT_AXIS (the throttle) but does not seem to be the case...

 

Or maybe the virtual joystick has not the same min/max value as the physical stick?

 

Thanks

Favorite modules : Huey, F-86F, F14 and P-51D

Quest 2, RTX 3080, i7 10700K, 16 Gb of RAM, Pro Flight Trainer PUMA helicopter setup, Warthog HOTAS with two force sensitive stick, custom cockpit and a GS-Cobra dynamic seat.

Link to comment
Share on other sites

Ok I think I found a way.

 

Here is my script if this could help someone...

 

include "target.tmh"

int main()
{
   if(Init(&EventHandle)) return 1;

   MapAxis(&Throttle, THR_RIGHT, DX_ZROT_AXIS, AXIS_REVERSED, MAP_ABSOLUTE);
   MapAxis(&Throttle, THR_LEFT, DX_XROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
   MapAxis(&Throttle, THR_FC, DX_YROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
}

int EventHandle(int type, alias o, int x)
{
if(&o == &Throttle & x == THR_RIGHT & Throttle[THR_RIGHT] <= 0)
{
	GetAxisData(&o, x);
	DXSetAxis(DX_XROT_AXIS, -32767);
	DXSetAxis(DX_YROT_AXIS, (abs(AxisVal(Throttle[THR_RIGHT], &axdata)))*2-32767);
}

if(&o == &Throttle & x == THR_RIGHT & Throttle[THR_RIGHT] > 0)
{
	GetAxisData(&o, x);
	DXSetAxis(DX_XROT_AXIS, (abs(AxisVal(Throttle[THR_RIGHT], &axdata)))*2-32767);
	DXSetAxis(DX_YROT_AXIS, -32767);
}

DefaultMapping(&o, x);
}

Favorite modules : Huey, F-86F, F14 and P-51D

Quest 2, RTX 3080, i7 10700K, 16 Gb of RAM, Pro Flight Trainer PUMA helicopter setup, Warthog HOTAS with two force sensitive stick, custom cockpit and a GS-Cobra dynamic seat.

Link to comment
Share on other sites

Oh and to answer my question, all the axis have values from -32767 to +32767 when they are virtual...

Favorite modules : Huey, F-86F, F14 and P-51D

Quest 2, RTX 3080, i7 10700K, 16 Gb of RAM, Pro Flight Trainer PUMA helicopter setup, Warthog HOTAS with two force sensitive stick, custom cockpit and a GS-Cobra dynamic seat.

Link to comment
Share on other sites

  • 1 month later...

Hi

 

Is your script allow to have upper half of the throttle increasing power and lower half decreasing it?

 

In other words, I want to achieve to have when throttle in middle course = 0, upper max = 100% power and lowher min (throttle iddle)=-100% this to manage straff in Star citizen.

Link to comment
Share on other sites

I don't think you need something special for that, just assign your throttle axis to thruster forward/backward option in star citizen and it should work.

 

I do that with my left T16000, to use it as strafe. A throttle should be no different...

Favorite modules : Huey, F-86F, F14 and P-51D

Quest 2, RTX 3080, i7 10700K, 16 Gb of RAM, Pro Flight Trainer PUMA helicopter setup, Warthog HOTAS with two force sensitive stick, custom cockpit and a GS-Cobra dynamic seat.

Link to comment
Share on other sites

Though beware as this is difficult to find the center of a throttle device, so will be hard to stop your ship ;)

This is why I use my hotas throttle as a... throttle (though near never used it except for cruising long distance), and use a T16000 on left hand (cheap and good stick) for thrusters.

 

Will use my new bought MFG Crosswind pedals for thrusters forward/backward though (toe brake) and roll (rudder).

Favorite modules : Huey, F-86F, F14 and P-51D

Quest 2, RTX 3080, i7 10700K, 16 Gb of RAM, Pro Flight Trainer PUMA helicopter setup, Warthog HOTAS with two force sensitive stick, custom cockpit and a GS-Cobra dynamic seat.

Link to comment
Share on other sites

Hum, yes, I know, it is why I don't use it as if on Elite...Using 2 sticks, I saw some vidoe but as I used throttle since 20+ year now, I'm not sure I will be able to use left hand stick...I certianly have a try too, so will see.

My pedals are configures to straff left right (rudder) and roll (toe brake) but roll is not analogic I set up keys to axis in TARGET. Did you manage to make it analogic?

Link to comment
Share on other sites

I do not have the thrustmaster pedals, I bought MFG Crosswind pedals, with three axis, for the two toe brakes and the rudder.

 

I was afraid in SC to not be able to use a left stick but in fact it is very intuitive, and very enjoyable, the best way to really enjoy space flight, and best dogfighting option.

 

I prefer the roll on rudder because I find it more intuitive for space flights. Will use the left stick for strafe up/down and left/right, and pedals for thrusters forward / backward. Especially in elite dangerous where you have to apply a constant roll to enter stations, this is more easy to me on the rudder axis to apply a constant push in a direction.

Favorite modules : Huey, F-86F, F14 and P-51D

Quest 2, RTX 3080, i7 10700K, 16 Gb of RAM, Pro Flight Trainer PUMA helicopter setup, Warthog HOTAS with two force sensitive stick, custom cockpit and a GS-Cobra dynamic seat.

Link to comment
Share on other sites

mmm don't understand. Left toe brake should be an axis. Right toe brake should be a second axis. And the third axis should be the rudder one.

 

So if you don't want to use a left stick, you should put left thruster on left toe brake, right thruster on right toe brake, and roll on the rudder axis.

Favorite modules : Huey, F-86F, F14 and P-51D

Quest 2, RTX 3080, i7 10700K, 16 Gb of RAM, Pro Flight Trainer PUMA helicopter setup, Warthog HOTAS with two force sensitive stick, custom cockpit and a GS-Cobra dynamic seat.

Link to comment
Share on other sites

YEs, but I choose the opposite, and the roll on toe brakes make the ships rolling every time because I have to push on brake to counter the rotation, but I could try to do like you said, I will see if it is the same in the same config than you, perhaps your pedals don't send the same value than mine, pergaps, they send 0 when no action are made on it. will see that

Link to comment
Share on other sites

All pedals should send 0 when no action are on them, that is strange.

Did you chose left toe brake as "roll left" and right toe brake as "roll right" in star citizen keybinding? Can we have an axis for roll right and roll left in star citizen ?

Favorite modules : Huey, F-86F, F14 and P-51D

Quest 2, RTX 3080, i7 10700K, 16 Gb of RAM, Pro Flight Trainer PUMA helicopter setup, Warthog HOTAS with two force sensitive stick, custom cockpit and a GS-Cobra dynamic seat.

Link to comment
Share on other sites

If toe brake sends a low value like maybe 10 or so, this is maybe a calibration issue. Maybe you can add with target a dead zone for your toe brakes for those to not send anything when not pressed.

 

Although, you should really try a dual stick setup, this is so intuitive in space... :)

Favorite modules : Huey, F-86F, F14 and P-51D

Quest 2, RTX 3080, i7 10700K, 16 Gb of RAM, Pro Flight Trainer PUMA helicopter setup, Warthog HOTAS with two force sensitive stick, custom cockpit and a GS-Cobra dynamic seat.

Link to comment
Share on other sites

Ok, so the results.

For the throttle it is ok, if I configure on straf forward/backward it works, but as planned it is really usefull.

For the pedals, besides that, whatever I try, the axes is not at 0 value when iddle. the value goes from -32768 (iddle) to +32768 (full press) the 0 value is between this 2 points. Whatever I tried, it doesn't work. I think there is a soft to calibrate that, I will search it, if it exists.

Link to comment
Share on other sites

Mmm no ok, this is the normal behaviour for an axis to go from -32768 to +32768.

So this is a proof that pedals (toe brake) are not well designed for roll ^^

 

But what I don't understand, is that if roll left is an axis in SC, it should be a normal axis going from -32000 to +32000.

 

If you want the axis to go from 0 to 64000 instead you have I think to handle this in TARGET and put math values to another axis, and then use that other axis for the roll left. This is a bit what I did when I tried to use the throttle for throttle/brake in racing sims, I have created two virtual axis. When my throttle was from 0 to 32000 throttle virtual axis went from -32000 to +32000 and the brake axis at -32000, and the opposite...

Favorite modules : Huey, F-86F, F14 and P-51D

Quest 2, RTX 3080, i7 10700K, 16 Gb of RAM, Pro Flight Trainer PUMA helicopter setup, Warthog HOTAS with two force sensitive stick, custom cockpit and a GS-Cobra dynamic seat.

Link to comment
Share on other sites

SO I tried this week end with 2 sticks, warthog in right hands and X55 in left. Well, I'm not better but it works, It is easier to handle straff, off course. I buy a T16000M because using X55 left handle is not so funny, and it is hard to handle, springs is somehow hard and it is painfull to use it.

Anyway, there is an issue in SC, using only straff forward/backward, the Spaecbrake is not working. Do you manage to make it works and if yes how?

Link to comment
Share on other sites

Unsure how to fight, but now with two sticks when I fight I'm strafing sideway while keeping the target in front, circling around. Works fine.

 

And indeed, spacebrake works only for throttle, not thrusters, so I do not use spacebrake anymore...

Favorite modules : Huey, F-86F, F14 and P-51D

Quest 2, RTX 3080, i7 10700K, 16 Gb of RAM, Pro Flight Trainer PUMA helicopter setup, Warthog HOTAS with two force sensitive stick, custom cockpit and a GS-Cobra dynamic seat.

Link to comment
Share on other sites

I think (will have to check again) that spacebrake works with thrusters in decoupled mode. Just not in coupled mode. Unsure it is a bug or a feature.

What is your SC handle? We could maybe continue a SC talking on SC ^^

 

Mine is like here on ED forums...

Favorite modules : Huey, F-86F, F14 and P-51D

Quest 2, RTX 3080, i7 10700K, 16 Gb of RAM, Pro Flight Trainer PUMA helicopter setup, Warthog HOTAS with two force sensitive stick, custom cockpit and a GS-Cobra dynamic seat.

Link to comment
Share on other sites

You're just doing arena commander?

But this is mainly to talk on forums ^^

Favorite modules : Huey, F-86F, F14 and P-51D

Quest 2, RTX 3080, i7 10700K, 16 Gb of RAM, Pro Flight Trainer PUMA helicopter setup, Warthog HOTAS with two force sensitive stick, custom cockpit and a GS-Cobra dynamic seat.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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