2 registered members (vicknick, AndrewAMD),
1,292
guests, and 3
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
[A6.60] All digital Gamepad
#285528
08/18/09 22:00
08/18/09 22:00
|
Joined: Feb 2006
Posts: 2,185
mpdeveloper_B
OP
Expert
|
OP
Expert
Joined: Feb 2006
Posts: 2,185
|
I was wondering if anyone had problems with all digital gamepads when using the joystick commands: joy_raw, joy_hat, and joy_rot. The gamepads are always showing as the up button being pressed even though it isn't. Multiple joysticks do this, and they have been tested and calibrated to make sure if that was the problem, so it's not a calibration issue, and the buttons are not messed up.
This happens ONLY with all digital as far as I've seen. Controllers that have analog and digital seem to work perfectly fine. Is there a workaround for this (other than using joy_force)? I can't use joy_force because I have to be able to use 2 joysticks.
- aka Manslayer101
|
|
|
Re: [A6.60] All digital Gamepad
[Re: mpdeveloper_B]
#285563
08/19/09 02:57
08/19/09 02:57
|
Joined: Jan 2006
Posts: 2,157 Connecticut, USA
Blink
Expert
|
Expert
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
|
i dont know mp, i have been using a xbox 360 controller, and i havent had any problems. i had a logitech joypad that worked the way you described, so i gave up, but the 360 controller has been flawless.
My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
|
|
|
Re: [A6.60] All digital Gamepad
[Re: jcl]
#285674
08/19/09 16:08
08/19/09 16:08
|
Joined: Feb 2006
Posts: 2,185
mpdeveloper_B
OP
Expert
|
OP
Expert
Joined: Feb 2006
Posts: 2,185
|
@Blink: that's because a 360 controller has analog and digital, this happens only with gamepads that do not have analog as far as i've noticed. @jcl: I'm not so sure it's related to the pad because it happens with more than one. The code I'm using is this: Don't worry about the variables such as p1_deadzone, etc. These are just to check which joystick is being pressed. THIS IS NOT THE ISSUE, SO PLEASE DON'T ASK.
function press_axis(dir, joynum)
{
var d;
if (joynum == 1 && num_joysticks >= 1)
{
d = ((p1_deadzone/100) * 127.5);
if (dir == joy_up) { if (joy_raw.y < -d) { dir = -(joy_raw.y/255); return(dir); } }
if (dir == joy_down) { if (joy_raw.y > d) { dir = (joy_raw.y/255); return(dir); } }
if (dir == joy_left) { if (joy_raw.x < -d) { dir = -(joy_raw.x/255); return(dir); } }
if (dir == joy_right) { if (joy_raw.x > d) { dir = (joy_raw.x/255); return(dir); } }
if (dir == joy_up) { if (joy_hat >= 0 && joy_hat <= 45 || joy_hat >= 315) { return(1); } }
if (dir == joy_left) { if (joy_hat >= 270 && joy_hat <= 315 || joy_hat <= 270 && joy_hat >= 225) { return(1); } }
if (dir == joy_down) { if (joy_hat >= 180 && joy_hat <= 225 || joy_hat <= 180 && joy_hat >= 135) { return(1); } }
if (dir == joy_right) { if (joy_hat >= 90 && joy_hat <= 135 || joy_hat <= 90 && joy_hat >= 45) { return(1); } }
}
if (joynum == 2 && num_joysticks >= 2)
{
d = ((p2_deadzone/100) * 127.5);
if (dir == joy_up) { if (joy2_raw.y < -d) { dir = -(joy2_raw.y/255); return(dir); } }
if (dir == joy_down) { if (joy2_raw.y > d) { dir = (joy2_raw.y/255); return(dir); } }
if (dir == joy_left) { if (joy2_raw.x < -d) { dir = -(joy2_raw.x/255); return(dir); } }
if (dir == joy_right) { if (joy2_raw.x > d) { dir = (joy2_raw.x/255); return(dir); } }
if (dir == joy_up) { if (joy2_hat >= 0 && joy2_hat <= 45 || joy2_hat >= 315) { return(1); } }
if (dir == joy_left) { if (joy2_hat >= 270 && joy2_hat <= 315 || joy2_hat <= 270 && joy2_hat >= 225) { return(1); } }
if (dir == joy_down) { if (joy2_hat >= 180 && joy2_hat <= 225 || joy2_hat <= 180 && joy2_hat >= 135) { return(1); } }
if (dir == joy_right) { if (joy2_hat >= 90 && joy2_hat <= 135 || joy2_hat <= 90 && joy2_hat >= 45) { return(1); } }
}
return(0);
}
I'm not sure if it is A6 specific, this is the first I've heard of the problem. The gamepads show up fine in windows and registers perfectly in windows, so I'm not sure the controllers are at fault. I'll try testing with lite-c I suppose.
- aka Manslayer101
|
|
|
Re: [A6.60] All digital Gamepad
[Re: mpdeveloper_B]
#285676
08/19/09 16:27
08/19/09 16:27
|
Joined: Feb 2006
Posts: 2,185
mpdeveloper_B
OP
Expert
|
OP
Expert
Joined: Feb 2006
Posts: 2,185
|
Just tested with Lite-C, it happens there too. As before mentioned I don't think it's the controller, this doesn't happen with just one.
Last edited by mpdeveloper_B; 08/19/09 16:29.
- aka Manslayer101
|
|
|
Re: [A6.60] All digital Gamepad
[Re: jcl]
#285934
08/21/09 16:16
08/21/09 16:16
|
Joined: Feb 2006
Posts: 2,185
mpdeveloper_B
OP
Expert
|
OP
Expert
Joined: Feb 2006
Posts: 2,185
|
the first gamepad is a Saitek P150, the second is a Gameon gamepad (model# FT2E92) both do not include analog.
The value is always 255 (or in the case of the code above, it always returns 1). I believe that it is only the up button that is counted as being pressed, and it's not only on the joy_raw.y value either, it's also on the joy_hat value.
- aka Manslayer101
|
|
|
Re: [A6.60] All digital Gamepad
[Re: mpdeveloper_B]
#286983
08/28/09 17:02
08/28/09 17:02
|
Joined: Feb 2006
Posts: 2,185
mpdeveloper_B
OP
Expert
|
OP
Expert
Joined: Feb 2006
Posts: 2,185
|
So has there been any progress on finding the cause of this bug?
- aka Manslayer101
|
|
|
Re: [A6.60] All digital Gamepad
[Re: jcl]
#287496
09/01/09 03:40
09/01/09 03:40
|
Joined: Feb 2006
Posts: 2,185
mpdeveloper_B
OP
Expert
|
OP
Expert
Joined: Feb 2006
Posts: 2,185
|
ok, thanks. It would also be nice if other people who have some digital exclusive gamepads could try too. I look forward to your results, and a possible solution.
- aka Manslayer101
|
|
|
|