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

Fix mouse events when physics_object_picking_first_only enabled #89643

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

mnemoli
Copy link
Contributor

@mnemoli mnemoli commented Mar 18, 2024

Fixes #89641
See issue for test project and reasoning. In my testing this change makes all the CollisionObject2D events (input, mouse_enter, mouse_exit, mouse_shape_enter, mouse_shape_exit) fire as expected.

The enter/exit events still fire continuously when sorting is OFF+first_only is ON, but this is expected and unavoidable (it's as if we're flipping rapidly and randomly between the stacked areas).

Copy link
Contributor

@Sauermann Sauermann left a comment

Choose a reason for hiding this comment

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

Have successfully tested the MRP with this PR rebased on 89850d5.
Code changes make sense to me.

@akien-mga akien-mga changed the title Fix mouse events when physics_object_picking_first_only enabled Fix mouse events when physics_object_picking_first_only enabled Apr 30, 2024
@akien-mga akien-mga merged commit ca38212 into godotengine:master Apr 30, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

physics_object_picking_first_only breaks mouse enter/exit/motion events
4 participants