Skip to content
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

Sensitivity applied before deadzone for dual axis inputs #495

Closed
yrns opened this issue Feb 28, 2024 · 2 comments · Fixed by #494
Closed

Sensitivity applied before deadzone for dual axis inputs #495

yrns opened this issue Feb 28, 2024 · 2 comments · Fixed by #494
Labels
bug Something isn't working

Comments

@yrns
Copy link

yrns commented Feb 28, 2024

Version

0.13.3

Operating system & version

NixOS unstable

What you did

Set input sensitivity <= deadzone, i.e.:

DualAxis::right_stick()
            .with_sensitivity(0.1, 0.1)
            .with_deadzone(DeadZoneShape::Ellipse {
                radius_x: 0.1,
                radius_y: 0.1,
            }),

What you expected to happen

Non-zero input values.

What actually happened

Zeroes.

Additional information

If the sensitivity for a dual axis input is less than or equal to the thresholds, the axis will never be considered "pressed". It seems extract_dual_axis_data ignores the deadzone for each axis (as it should) but applies the sensitivity, then checks the deadzone later. In the aforementioned case the inputs are never outside the deadzone. I think this is a bug. The sensitivity should be applied after the deadzone is checked?

@yrns yrns added the bug Something isn't working label Feb 28, 2024
@Shute052
Copy link
Collaborator

Shute052 commented Feb 29, 2024

it looks like #494 should have fixed this

And the new with_sensitivity represents the scale of input values before further processing, i.e., how responsive the input processor is to the received input values
You could use with_output_scale to multiply the output

@yrns
Copy link
Author

yrns commented Mar 3, 2024

it looks like #494 should have fixed this

I will check when merged if this is still open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants