Some time ago i'm add based xbox360 controller support (based on directQ)
By default left and right lower triggers work as sticks, not as buttons. MH use it for strafe move.
We can map this triggers to some buttons (fire, jumps...)?
xInput (xbox360 controller) in quake engines
Re: xInput (xbox360 controller) in quake engines
the analog triggers report values between 0 and 255, yes.
just consider them pressed if they're above 128 and depressed if lower.
buttons = (uint32_t)xinput.buttons;
if (xinput.lefttrigger>127) buttons |= 0x10000;
if (xinput.righttrigger>127) buttons |= 0x20000;
and then pretend it has 18 buttons instead of 16. you can then bind it or not, and scale(via cvar) any stick movement from them to 0 or not.
just consider them pressed if they're above 128 and depressed if lower.
buttons = (uint32_t)xinput.buttons;
if (xinput.lefttrigger>127) buttons |= 0x10000;
if (xinput.righttrigger>127) buttons |= 0x20000;
and then pretend it has 18 buttons instead of 16. you can then bind it or not, and scale(via cvar) any stick movement from them to 0 or not.
Re: xInput (xbox360 controller) in quake engines
I can't remember why I used them for strafe, although I think that the N64 version of Quake used the equivalent buttons, and I would have probably followed that lead.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
We knew the words, we knew the score, we knew what we were fighting for
Re: xInput (xbox360 controller) in quake engines
now all work fine
tnx
tnx