Replies: 2 comments 5 replies
-
You can get the clamped axis values if you want by using I think it's probably not that big of a concern as long as you read the clamped output.
Absolutely. Here's what I do in my game for inputting the "down" direction on my menu screen: SingleAxis {
axis_type: AxisType::Gamepad(GamepadAxisType::LeftStickY),
positive_low: 1.0,
negative_low: -0.5,
value: None,
} ( link to code ) Is your Edit: Nevermind, I just saw your DEADZONE const at the top of your codeblock. 🤔 Strange that it's not working, everything looks fine, I wonder if something else is wrong. |
Beta Was this translation helpful? Give feedback.
-
That was my initial thought, too, but other developers thought that it was more clear to avoid the option and go with a plain @alice-i-cecile Maybe we could open a poll about preference on that? I'm not sure if we could do that on GitHub discussions and maybe advertise it on Discord to try and get as many opinions as possible. Not sure, just a thought. |
Beta Was this translation helpful? Give feedback.
-
Hey, been struggling with this for a while now and can't seem to figure it out. I want to bind an action,
NavigationAction::SnapReverse
, to swiping down on the right stick. I have:Unfortunately, this always triggers whenever I do anything on the right stick regardless of axis, and doesn't seem to respect the deadzone.
First, am I on the correct path with this binding?
If so, the syntax is a bit confusing. I don't care about the positive axis at all, but I still have to set an arbitrary value that my controller theoretically can't hit. Making these values
Option<_>
would be a bit clearer IMO.Also, I'm not sure if these axis values are clamped, and am vaguely worried I'll get something out-of-bounds from either an off-brand gamepad sending wonky values, or some wild hardware that represents controls over a wider range. Not sure how realistic this concern is.
Thanks for any help.
Beta Was this translation helpful? Give feedback.
All reactions