godotengine / godotengine/godot

Area2D's don't receive input from Subviewports

Open
#97,267 5 comments 3 reactions 0 assignees View on GitHub
documentation enhancement topic:gui topic:input
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

Tested in v4.3.stable.official [77dcf97d8]

### System information

Godot v4.3.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated AMD Radeon RX 6800 XT (Advanced Micro Devices, Inc.; 32.0.11037.4004) - AMD Ryzen 9 5950X 16-Core Processor (32 Threads)

### Issue description

Area2d nodes aren't getting any input when they're inside a subviewport. Handle input locally, pickable, monitorable, all correctly set to on. Pushing all input events into the scene and nothing; First discovered in my current game where I'm rendering 2d scenes via subviewports in 3d. Decided to test in purely 2d, same issue.

Made a test project to show side by side, area2d receives no input while a control node works fine.

### Steps to reproduce

Have a 2d scene with area2d inside of it set to handle input (printing out all inputs on input_event signal as example). Put this 2d scene inside a viewport and those inputs aren't being received, ie, nothing will print out.

The purely 2d scene can be run alone and can be shown to work fine.

![image](https://github.com/user-attachments/assets/0cefc3a7-8961-4ad1-b6f0-a682eca88693)
![image](https://github.com/user-attachments/assets/e6272f91-76a5-43c8-8e4a-0e65996db4bc)

### Minimal reproduction project (MRP)

[guitest.zip](https://github.com/user-attachments/files/17082978/guitest.zip)

Contributor guide

Open the contributing guide

Research direction

Start with the guitest.zip minimal reproduction and compare the standalone 2D scene with the same scene inside a Subviewport. Verify the Area2D input_event behavior against the working Control node case; done means Area2D nodes inside Subviewports receive input as described.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.