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

Added option to always update the mouse picking via saving the last m… #68

Conversation

chaoticgood1
Copy link
Contributor

Hi! We implemented the ff:

@aevyrie
Copy link
Owner

aevyrie commented Dec 6, 2020

Thanks! What is the impact of defaulting to always on?

For example, if the window is not active, will it continue to check for intersections every frame? I think the answer is yes.

I ask because based on @Sheepyhead's use case, they would need it to be enabled, and it might actually make sense if this is default behavior. However, my only worry is that it will always be running even when the application isn't being used. This isn't an issue now, because mouse events are not sent when the window is inactive.

src/lib.rs Outdated Show resolved Hide resolved
@aevyrie
Copy link
Owner

aevyrie commented Dec 12, 2020

Looks like the multiple_windows.rs example needs a small fix with this change.
https://github.com/aevyrie/bevy_mod_picking/pull/68/checks?check_run_id=1540877088#step:6:405

199 |             PickMethod::CameraCursor(WindowId::primary()),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^ ------------------- supplied 1 argument
    |             |
    |             expected 2 arguments

217 |             PickMethod::CameraCursor(window_id),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^ --------- supplied 1 argument
    |             |
    |             expected 2 arguments

run cargo test on your branch to see the errors.

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