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

InputMap has no action_get_deadzone() getter #50061

Closed
Wolfe2x7 opened this issue Jul 1, 2021 · 0 comments · Fixed by #50065
Closed

InputMap has no action_get_deadzone() getter #50061

Wolfe2x7 opened this issue Jul 1, 2021 · 0 comments · Fixed by #50065

Comments

@Wolfe2x7
Copy link

Wolfe2x7 commented Jul 1, 2021

Godot version

3.3.2 stable

System information

Linux Mint 20.1

Issue description

When allowing a user to configure deadzones for inputs, GDScript enables us to set a new deadzone, but not to read back the current deadzone (ie. to merely modify the existing setting). I poked around a bit and did not find any clues for a way to do this.

I've kind of worked around it in my project with an uncommon method to set deadzones. Whenever the user binds an InputEventJoypadMotion to an action in the upcoming version of my game, a prompt appears allowing them to set the deadzone for the input. However, because of this issue, the deadzone slider I've implemented must start from a certain value every time the option appears, or a value saved to a variable.

It would be simpler to be able to read the deadzone for an action from the InputMap and modify it from that value.

Steps to reproduce

See the documentation for InputMap
Notice there is no action_get_deadzone()
Have yourself a cup of coffee (or whatever you prefer), because you guys work hard and Godot is awesome! :)

Minimal reproduction project

No response

@Calinou Calinou changed the title InputMap has no action_get_deadzone() getter InputMap has no action_get_deadzone() getter Jul 1, 2021
@akien-mga akien-mga added this to the 4.0 milestone Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants