-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Implement pause-aware picking (3.2) #39421
Implement pause-aware picking (3.2) #39421
Conversation
faf1071
to
7e141a9
Compare
Any news on this? It's been laying about for 2 months and it fixes a fairly important issue... |
@Zireael07 Akien is currently on vacation, so pull requests most likely won't be merged for a week or so. It's also safer to release 3.2.3 first to minimize the risk of regressions in that release. |
Happy new year's eve any chance this can get a review? Click / signal detection while paused is pretty foundational, the only available work-arounds are pretty janky. |
7e141a9
to
b2e1ed0
Compare
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.
Nice work! This is very useful. I've tested with pause-immuned objects and pausable objects, and it was acting as expected (after the little fix from my review comment).
Also, before this is merged it would be nice to properly document this project option so users know what to expect.
This adds a new project setting (`physics/common/enable_pause_aware_picking`). It's disabled by default. When enabled, it changes the way 2D & 3D physics picking behaves in relation to pause: - When pause is set, every collision object that is hovered or captured (3D only) is released from that condition, getting the relevant mouse-exit callback., unless its pause mode makes it immune from pause. - During the pause. picking only considers collision objects immune from pause, sending input events and enter/exit callbacks to them as expected. - When pause is left, nothing happens. This is a big difference with the classic behavior, which at this point would process all the input events that have been queued against the current state of the 2D/3D world (in other words, checking them against the current position of the objects instead of those at the time of the events).
b2e1ed0
to
745c711
Compare
Pushed with the fix for the condition and the new setting documented. |
Thanks! |
NOTES:
Viewport
'sINTERNAL_PHYSICS_PROCESS
to a function. The logic changes in that section of code are some checks to let it work with either the classic or the new behavior.This adds a new project setting (
physics/common/enable_pause_aware_picking
). It's disabled by default.When enabled, it changes the way 2D & 3D physics picking behaves in relation to pause:
Fixes #3703.