You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When receiving an input event and using push_input to pass it to a SubViewport (that has physics_object_picking set to true), 3d objects do not receive the expected mouse events.
Steps to reproduce
With MRP:
Open MRP and run.
Click left cube and see that it rotates.
Click right (blue) cube and see that it does not rotate.
Note that the right cube is being displayed through a SubViewport rendered onto a Sprite2D, and input events on the sprite are being pushed to the SubViewport via push_input.
Note that this did work in 4.3.dev4
From scratch:
Create a scene with an Area3D (and a matching visual aid) and hook up a print statement to the input_event, mouse_entered, mouse_exited signals. Add a camera to the scene and point it at the Area3D.
Wrap the scene in a SubViewport with physics_object_picking enabled.
Create a TextureRect outside the SubViewport and set it to display the SubViewport's ViewportTexture.
Add an input handler on the TextureRect, and pass the received input to the SubViewport via push_input.
Run the scene and note that the signals are not received.
One of the cubes rendered is in the scene directly, the other is in a SubViewport having events pushed to it. If you click the cubes, they should randomly rotate themselves. In 4.3.dev4 and earlier, they do. In 4.3.dev5 the one in a SubViewport does not.
The text was updated successfully, but these errors were encountered:
Thank you for the report.
This change got introduced by #88992.
A way to mitigate this is shown in this project: SubViewportAndMouseAreaWithChangedChanges.zip
Make sure, that the SubViewport receives mouse-entered/exited notifications, when the mouse enters/exits the sprite.
Since this problem has already been reported in #89757, I will consolidate this issue as a duplicate with #89757.
Tested versions
System information
Godot v4.3.dev5 - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4090 (NVIDIA; 31.0.15.5123) - AMD Ryzen 9 7950X 16-Core Processor (32 Threads)
Issue description
When receiving an input event and using
push_input
to pass it to a SubViewport (that hasphysics_object_picking
set to true), 3d objects do not receive the expected mouse events.Steps to reproduce
With MRP:
push_input
.From scratch:
physics_object_picking
enabled.push_input
.Minimal reproduction project (MRP)
https://github.com/godotengine/godot/files/11975240/SubViewportAndMouseAreaWithChanges.zip, originally posted in response to #79128 as a demonstration of how to propagate input events to a SubViewport is a good demonstration of the behaviour.
One of the cubes rendered is in the scene directly, the other is in a SubViewport having events pushed to it. If you click the cubes, they should randomly rotate themselves. In 4.3.dev4 and earlier, they do. In 4.3.dev5 the one in a SubViewport does not.
The text was updated successfully, but these errors were encountered: