-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
[Regression] SubViewportContainer doesn't call _CanDropData event #99155
Comments
Bisected to #67531, @Sauermann |
#67531 introduced a conceptional change for how Drag&Drop works. This reduction in functionality for
the two nodes One basic axiom/assumption is, that only a single Control node will receive the Drop event. In order to enable, that more than one Control node receives that Drop event, we would need a meaningful proposal or problem/project description, why that would be necessary, because it would make the code much more complex. I don't see the argumentation within this issue as sufficient reason for such a change. So there are currently two possible solutions: In #67531, I discarded (A) as a potential solution, because that would make it much more work-intensive for users to drop on Control nodes within A potential solution could be a compromise, that whenever the mouse is over a Personally I would prefer that users should consider |
With the explanation that wasn't a bug and with the chance of renabling this can lead to bugs i think we should keep this behavior and update |
If that's the case I can probably workaround this issue by adding a control over the entire screen. I chose the SubViewportContainer just because I needed to drag and drop items from my inventory to the world map, and SubViewportContainer covers the whole viewport. So it seemed easier doing it like that. Tomorrow I can test and see if I can easily change to another control node. Anyway this is a regression and should've been added to the Known issues in the blog post for 4.4dev4 release, or noted somewhere so people can know about this issue. |
UPDATE: Moving to a Control under the SubViewport fixes the problem. It was a easy fix, but I still belive people will report this as a problem in the future as SubViewportContainer is a Control and its expected that the drag events works on Controls. Not sure what is the best solution here anyways will leave to the Godot Team to decide. |
I had the exact same problem as @conde2, when attempting to throw items on the world map from the inventory I used to connect on the SubViewportContainer; But not it no longer works... So I came here and saw that a solution would be to use a Control node that is the whole screen size, so I did it... But it doesn't work for my game (although it kind works)... The main reason for it to not work for my game is because it completely breaks the Physics Pickup functionality... as soon as I have a control that takes the whole screen it no longer triggers the Area2D input_event... @Sauermann, please explain how we can fix this issue using this approach, otherwise this reduction in functionality must be postponed until this has a definition... Also, I did some research and it seems that this issue might be related with this issue over here to some degree: #95116 On the documentation it says that Objects Physics is the last of the things executed and taken into consideration on the input cascade... On the issue which @AdamLearns points out, that doesn't seem to fit what is being explained in the docs, it is somehow marking inputs as handled for some nodes on his example, so maybe the issue starts here? I also did an example of my own to try reproducing his issue and added the UnhandledInput event on the
As soon as I enable the I tried to find a workaround, but couldn't find any; My only possibility here is to rollback to stable version to get both the Drag & Drop and the Physics Picking features to work together; Tested versionsv4.4.dev4.mono.official [36e6207] System informationGodot v4.4.dev4.mono - macOS 15.1.0 - Multi-window, 1 monitor - Metal (Forward+) - integrated Apple M1 Pro (Apple7) - Apple M1 Pro (8 threads) Issue descriptionSolution proposed on this issue #99155 doesn't work with Object Physics Picking functionality, need a way to implement both Physics Picking and Drag & Drop functionality together... Seems to have started here: #67531 According to @Sauermann... Steps to reproduceIf the FullScreenControl Mouse Filter is set to With FullScreenControl Mouse Filter set to In other words, there seems to be no way to make Physics Picking and Drag & Drop (which requires fullscreen Control) for the same viewport, which in IMO is a VERY big deal; |
Tested and I can confirm this problem, there is no way to enable Physics Picking Object and Drag and Drop in the same viewport. |
@jopheno thanks for the detailed reproduction steps for physics picking, which I would consider a separate bug than the issue of opening post. I have implemented an alternative approach to solve both problems. It is available in #99270.
The order of execution for input events is guaranteed within a Viewport, but not globally. What happens here is the following:
|
Tested versions
v4.4.dev4.mono.official [36e6207]
System information
Godot v4.4.dev4.mono - Windows 10.0.19045 - Multi-window, 1 monitor - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 Ti (NVIDIA; 32.0.15.6094) - AMD Ryzen 7 3700X 8-Core Processor (16 threads)
Issue description
Overriding _CanDropData on a SubViewportContainer doesn't work, the event is never called.
Steps to reproduce
Just create a SubViewportContainer and add the _CanDropData and check that the event is not called when trying to drop something.
Minimal reproduction project (MRP)
I don't have any at the moment. Will work on adding one later.
The text was updated successfully, but these errors were encountered: