-
-
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
Fix SubViewport physics picking #87385
Fix SubViewport physics picking #87385
Conversation
Apply the logic of `handle_input_locally` for physics picking.
if (!handle_input_locally) { | ||
Viewport *vp = this; | ||
while (!Object::cast_to<Window>(vp) && vp->get_parent()) { | ||
vp = vp->get_parent()->get_viewport(); | ||
} | ||
vp->local_input_handled = false; | ||
} | ||
|
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.
Just to be sure, you seem to skip every viewport (even ones with local_input_handled == true
until the last one, then you set local_input_handled
to false
.
Is this what you want?
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.
This PR intends to treat handle_input_locally
for physics picking in the same way as it is treated in other places. That includes skipping viewports with local_input_handled == true
.
The fact that currently handle_input_locally
is treated differently in different parts of the code-base is the reason for the linked issue.
Thanks! |
Apply the logic of
handle_input_locally
for physics picking.resolve #84258
cherry-pick of #85665 from 4.2 to master.
I see this as an interim solution until #77926 gets reviewed.
I believe, that it is unlikely that #77926 gets reviews anytime soon, but since #84258 is quite nasty, I want to provide a bugfix-PR, that is easier to review and that already received some testing in 4.2.