-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Joysticks on N3DS #14
Comments
The Axis IDs are different from the other Gamepad buttons, so that might be the issue you are running into. local leftAxisX = Input.GetGamepadAxisValue(Gamepad.AxisLX)
local leftAxisY = Input.GetGamepadAxisValue(Gamepad.AxisLY) The axes are Gamepad.AxisL -- Left Trigger
Gamepad.AxisR -- Right Trigger
Gamepad.AxisLX -- Left Stick X
Gamepad.AxisLY -- Left Stick Y
Gamepad.AxisRX -- Right Stick X
Gamepad.AxisRY -- Right Stick Y In hindsight, I'm not sure if I like the names I gave them... It's true that Input.IsGamepadConnected(1) isn't returning an accurate value on 3DS, but it should be safe to assume that the Gamepad 1 is always available on 3DS. I'll make a note to fix that though. Edit: Just fixed Input.IsGamepadConnected() for 3DS. Thanks for pointing that out! |
Awesome work! Also I got the axis readout working too, looks like I just was a little stupid, this is what I did before: for some reason I thought that the index is indexing the coordinate like 0 for x, 1 for y and so on... One thing is a bit weird though, the R-Joystick on the New3DS is only outputing 9 possible values. For example (1,0) or (0,0) or (-1,0) and so on. There are no inbetweens, I dont know if it is normal I was just expecting it to work exactly as the L-Joystick. Anyways.... Thanks for your quick response and even fix. |
Hi,
I am playing around a bit with your engine and want to make a little game for the N3DS.
However I have some trouble reading the joysticks axis.
Using
Input.IsGamepadConnected(1)
returns false which for me does not make much sense to me butInput.IsGamepadButtonDown(Gamepad.Left)
for example works perfectly fine.Now I dont know if I am using
Input.GetGamepadAxisValue
wrong, becuase testing it on windows just crashes the editor. I previously usedInput.IsGamepadConnected(1)
to check if there even is axis input but since the N3DS does not trigger this I kind of dont know if I am using it wrong or if I have to detect the platfrom differently.The text was updated successfully, but these errors were encountered: