ggez / ggez-goodies

Useful modules for the ggez Rust game framework.
MIT License
63 stars 17 forks source link

Changing directions on axis input doesn't work #8

Closed keeslinp closed 6 years ago

keeslinp commented 6 years ago

I noticed that when the InputState is being used, the update function does not properly change directions if the axis_state.position has already reached 1. This is because of this line (https://github.com/ggez/ggez-goodies/blob/master/src/input.rs#L166). It will always evaluate to 0 even if the direction has changed.

It sounds like you don't have a ton of time for this project, but hopefully I can get a PR ready soon and take care of the problem.

icefoxen commented 6 years ago

Awesome, thanks for the PR! I need to find the time to revisit and streamline the input code a bit as well... It's sort of halfway between ggez and Unity3D as it is.