-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Button inside viewport not receiving input when Camera2D active #48368
Comments
These look very much like having the same root cause as my issue. Hard to be sure though. Also, I see that godotengine/godot-visual-script#39 mentions that for viewports "you have to calculate input offsets yourself", which I don't remember reading anywhere in the docs. Is that true? And if it is, with things like button events we don't directly control the offset calculation so there isn't much to be done. |
Edit: as @elektito mentioned, after resizing the window the issue is present. |
I use a tiling window manager (StumpWM) so when I run the game, it opens maximized by default. I tried the test project again in a "float group" which simulates a non-tiling window manager. Upon running, with the Camera2D current, the button seemed to work fine. Then I resized the window and suddenly it stopped working. So looks like this only happens when the window is resized to something other than the default size. Maybe that's a clue. Not sure. |
Also, looks like if I set the stretch mode to 2d and aspect to "keep", the button continues to work fine even after resize. Although I've got another non-minimal project of my own which seems to still have the issue even with stretch settings set to 2d/keep. That one's only tested in the tiling window manager. EDIT: Tried that other project in non-tiling window manager and it still has issues. I can share it if helps, but it's a bit of a mess. |
Is there an upDate on the issue ?
|
I have tested the MRP with v4.2.dev3.official [013e8e3] and I can no longer replicate the bug. |
Godot version:
3.3
OS/device including version:
Ubuntu 20.04
Issue description:
Button placed inside a Viewport receive mouse clicks normally, but when a Camera2D is active (whether Viewport is a child of the camera or not) the clicks won't register with the button at all.
Steps to reproduce:
The above just looks at the button's normal animation when clicked, but if you connect an event handler to the pressed signal of the button, you see that with the Camera2D current, the signal is not fired either.
Minimal reproduction project:
test-viewport-input.zip
The text was updated successfully, but these errors were encountered: