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

allow changing speed by scrolling #10

Closed
wants to merge 0 commits into from

Conversation

jakobhellermann
Copy link

Adds a scroll_sensitivity config option.
The default value is 0.1, which means the speed will be multiplied by 1.1 when scrolling up and by 0.9 when scrolling down.
If someone doesn't want that behavior, they can disable it by setting the sensitivity to 0.0.

@jakobhellermann
Copy link
Author

I also changed Cargo.toml to not use the default bevy features, which should make crates that don't need them (and CI) compile faster.

src/lib.rs Outdated
for (mut options, mut transform) in query.iter_mut() {
if scroll_delta < 0.0 {
options.speed *= 1.0 - options.scroll_sensitivity;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The options took me a while to figure out what it is, that's why consider renaming it to fly_camera.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants