-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Mouse input accumulation #14044
Mouse input accumulation #14044
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for tackling this :) I've left some feedback covering how I think we can improve this. If you're looking for ideas on docs or implementation, please feel free to borrow liberally from my implementation in LWIM.
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff, thanks for the prompt and agreeable response :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great if the mouse_input
or mouse_input_events
examples were updated to show these off
I already updated the |
Whoops, don't know how I missed that 😅 . LGTM |
Co-authored-by: Gino Valente <49806985+MrGVSV@users.noreply.github.com>
Co-authored-by: Gino Valente <49806985+MrGVSV@users.noreply.github.com>
# Objective - Add the `AccumulatedMouseMotion` and `AccumulatedMouseScroll` resources to make it simpler to track mouse motion/scroll changes - Closes bevyengine#13915 ## Solution - Created two resources, `AccumulatedMouseMotion` and `AccumulatedMouseScroll`, and a method that tracks the `MouseMotion` and `MouseWheel` events and accumulates their deltas every frame. - Also modified the mouse input example to show how to use the resources. ## Testing - Tested the changes by modifying an existing example to use the newly added resources, and moving/scrolling my trackpad around a ton. --------- Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com> Co-authored-by: Gino Valente <49806985+MrGVSV@users.noreply.github.com>
# Objective - Add the `AccumulatedMouseMotion` and `AccumulatedMouseScroll` resources to make it simpler to track mouse motion/scroll changes - Closes bevyengine#13915 ## Solution - Created two resources, `AccumulatedMouseMotion` and `AccumulatedMouseScroll`, and a method that tracks the `MouseMotion` and `MouseWheel` events and accumulates their deltas every frame. - Also modified the mouse input example to show how to use the resources. ## Testing - Tested the changes by modifying an existing example to use the newly added resources, and moving/scrolling my trackpad around a ton. --------- Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com> Co-authored-by: Gino Valente <49806985+MrGVSV@users.noreply.github.com>
Objective
AccumulatedMouseMotion
andAccumulatedMouseScroll
resources to make it simpler to track mouse motion/scroll changesSolution
AccumulatedMouseMotion
andAccumulatedMouseScroll
, and a method that tracks theMouseMotion
andMouseWheel
events and accumulates their deltas every frame.Testing