-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Rewrite Gui in 3D demo to use Physics Picking for mouse events #925
Conversation
dda505c
to
c40e503
Compare
c40e503
to
8bd6aed
Compare
8bd6aed
to
4013302
Compare
For the record, your commit seems not to be linked to your GitHub account. See: Why are my commits linked to the wrong user? for more info. |
4013302
to
7b127d7
Compare
@akien-mga thanks, first commit to a repository and I missed to set it up. |
Tested locally with 4.2.dev godotengine/godot@6758a7f8c (Linux), it mostly works as expected. One issue with OptionButtons is that their popup doesn't update when you don't move the mouse but the camera moves: simplescreenrecorder-2023-08-24_01.00.21.mp4 |
My current understanding is, that this needs to be resolved in the main-repository, since I can't do anything from this side to fix this. It is however not a regression, because the current implementation also has this problem. |
Note: Do not merge until 4.2 is released, as the |
7b127d7
to
553b1cb
Compare
I found a solution for this problem: godotengine/godot#81243 |
553b1cb
to
910e189
Compare
910e189
to
b8d3692
Compare
Rework Gui in 3D Demo to handle mouse events via Physics Picking instead of in _unhandled_input. This brings several benefits: - Correctly handle cases, where the 3D-GUI is located behind other collision objects. - Proper passive hovering support This allows also to make simplifications in the code, because 3D-mouse position no longer needs to be calculated manually.
b8d3692
to
1a4c423
Compare
Is everyone ok with the merge of |
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.
Tested locally on 4.2.1, it works as expected.
Rework Gui in 3D Demo to handle mouse events via Physics Picking instead of in _unhandled_input.
This brings several benefits:
This allows also to make simplifications in the code, because 3D-mouse position no longer needs to be calculated manually.
This PR does for 3D, what godotengine/godot#58334 did for 2D-SubViewportContainer.
Needs to work correctly godotengine/godot#78383 (included in V4.2)
Updated 2023-08-31: Make sure to include Velocity in
InputEventMouseMotion
when sending event to SubViewport. (Necessary for solving #925 (comment))Updated 2023-11-10: Ordering of lines in config files has changed.
Updated 2024-02-21: Rebase after #1013