Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Objective Add a get_unclamped method to [Axis](https://docs.rs/bevy/0.10.1/bevy/input/struct.Axis.html) to allow it to be used in cases where being able to get a precise relative movement is important. For example, camera zoom with the mouse wheel. This would make it possible for libraries like leafwing input manager to leverage `Axis` for mouse motion and mouse wheel axis mapping. I tried to use it my PR here Leafwing-Studios/leafwing-input-manager#346 but will likely have to revert that and read the mouse wheel events for now which is what prompted this PR. ## Solution Instead of clamping the axis value when it is set, it now stores the raw value and clamps it in the `get` method. This allows a simple get_unclamped method that just returns the raw value. ## Changelog - Added a get_unclamped method to Axis that can return values outside of -1.0 to 1.0
- Loading branch information