# Input\_event not working when clicking on area2d

**URL:** <https://forum.godotengine.org/t/input-event-not-working-when-clicking-on-area2d/132899>\
**Category:** Help\
**Tags:** 2d, gdscript, godot-4\
**Created:** [February 8, 2026, 3:39pm UTC](https://forum.godotengine.org/t/input-event-not-working-when-clicking-on-area2d/132899 "2026-02-08T15:39:47Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![melon.li](https://forum.godotengine.org/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@melon.li](https://forum.godotengine.org/u/melon.li)\
**Post date:** [February 8, 2026, 3:39pm UTC](https://forum.godotengine.org/t/input-event-not-working-when-clicking-on-area2d/132899/1 "2026-02-08T15:39:47Z")

</div>

### Godot Version

4.5

### Question

I have the same issue as [this post](https://forum.godotengine.org/t/input-event-not-working-when-clicking-on-area2d/107324) but the solution did not help.

here are my code

```auto
extends Area2D

@export var seleted = false
# Called when the node enters the scene tree for the first time.
func _process(delta: float) -> void:
	if seleted:
		self.global_position = get_global_mouse_position()

func _input(event: InputEvent) -> void:
	if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT:
		print("input works")

func _on_input_event(viewport: Node, event: InputEvent, shape_idx: int) -> void:
	print("input_event works")
	if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT:
		if event.pressed:
			seleted = !seleted

```

I have:

1. enabled piackable for my area2d
2. checked that physics Object Picking is set to on
3. show collision layer when I debug the game and confirms I’m clicking on collison layer
4. have one collison layer + mask enabled
5. didn’t use any control node + run the node locally so it shouldn’t intercept anything

yet when I click on the object, input\_event works does not get printed.

 ![image](https://forum.godotengine.org/uploads/default/original/3X/3/6/36b85b5e405c94ca35e95904f8b56afff688797d.png)

 ![image](https://forum.godotengine.org/uploads/default/original/3X/f/8/f8f8ae44e9c678f4b702d9cf8cc34ddaf85f67ad.png)

here is how my scene looks, please let me know how to fix this

---

<div class="post-metadata">

**Author:** ![dragonforge-dev](https://forum.godotengine.org/user_avatar/forum.godotengine.org/dragonforge-dev/32/26042_2.png) [@dragonforge-dev](https://forum.godotengine.org/u/dragonforge-dev)\
**Post date:** [February 8, 2026, 4:39pm UTC](https://forum.godotengine.org/t/input-event-not-working-when-clicking-on-area2d/132899/2 "2026-02-08T16:39:51Z")

</div>

Add this to your script:

```gd
func _ready() -> void:
	input_event.connect(_on_input_event)

```

also I think you have a typo in your variable name `seleted `. I think you meant `selected`.

---

<div class="post-metadata">

**Author:** ![normalized](https://forum.godotengine.org/user_avatar/forum.godotengine.org/normalized/32/58558_2.png) [@normalized](https://forum.godotengine.org/u/normalized)\
**Post date:** [February 8, 2026, 4:41pm UTC](https://forum.godotengine.org/t/input-event-not-working-when-clicking-on-area2d/132899/3 "2026-02-08T16:41:06Z")

</div>

`Panel` might be consuming the event.

---

<div class="post-metadata">

**Author:** ![dragonforge-dev](https://forum.godotengine.org/user_avatar/forum.godotengine.org/dragonforge-dev/32/26042_2.png) [@dragonforge-dev](https://forum.godotengine.org/u/dragonforge-dev)\
**Post date:** [February 8, 2026, 4:43pm UTC](https://forum.godotengine.org/t/input-event-not-working-when-clicking-on-area2d/132899/4 "2026-02-08T16:43:40Z")

</div>

You can check what @normalized said in the **Debug → Misc** panel.

 ![image](https://forum.godotengine.org/uploads/default/original/3X/b/1/b1216e5d870987bebaf820c8c4fae733f6892186.png)

Click on the item (_when the game is running in the editor_) and see what it says you clicked on. If it’s **Panel** change the **Mouse Filter** to **Pass**.

 ![image](https://forum.godotengine.org/uploads/default/original/3X/4/f/4f8d503ee2fbf42a8bfd4472d945dcc2075262cd.png)

---

<div class="post-metadata">

**Author:** ![melon.li](https://forum.godotengine.org/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@melon.li](https://forum.godotengine.org/u/melon.li)\
**Post date:** [February 8, 2026, 4:57pm UTC](https://forum.godotengine.org/t/input-event-not-working-when-clicking-on-area2d/132899/5 "2026-02-08T16:57:31Z")

</div>

interesting, I did try to swap their orders in scene tree before coming here. but after setting mouse filter to pass it does work. ty!

---

<div class="post-metadata">

**Author:** ![paintsimmon](https://forum.godotengine.org/user_avatar/forum.godotengine.org/paintsimmon/32/45257_2.png) [@paintsimmon](https://forum.godotengine.org/u/paintsimmon)\
**Post date:** [February 8, 2026, 5:03pm UTC](https://forum.godotengine.org/t/input-event-not-working-when-clicking-on-area2d/132899/6 "2026-02-08T17:03:28Z")

</div>

The order in the scene tree doesn’t matter in this case. GUI inputs are always processed before physics input. This diagram from [the docs](https://docs.godotengine.org/en/stable/tutorials/inputs/inputevent.html) shows the exact order.

![](https://docs.godotengine.org/en/stable/_images/input_event_flow.webp)

---

<div class="post-metadata">

**Author:** ![dragonforge-dev](https://forum.godotengine.org/user_avatar/forum.godotengine.org/dragonforge-dev/32/26042_2.png) [@dragonforge-dev](https://forum.godotengine.org/u/dragonforge-dev)\
**Post date:** [February 8, 2026, 5:17pm UTC](https://forum.godotengine.org/t/input-event-not-working-when-clicking-on-area2d/132899/7 "2026-02-08T17:17:12Z")

</div>

@normalized This is the other reason I’m working on putting less effort into my answers. I do too much that people don’t ask for. I’m trying to change from “teach them to fish” to “give them a hint and they’ll fish sooner or later”.

---

<div class="post-metadata">

**Author:** ![normalized](https://forum.godotengine.org/user_avatar/forum.godotengine.org/normalized/32/58558_2.png) [@normalized](https://forum.godotengine.org/u/normalized)\
**Post date:** [February 8, 2026, 5:24pm UTC](https://forum.godotengine.org/t/input-event-not-working-when-clicking-on-area2d/132899/8 "2026-02-08T17:24:29Z")

</div>

I think it’s totally ok to give a more elaborate answer, just not right away… especially if the question boils down to basically remote debugging with a lot of missing information.

---

<div class="post-metadata">

**Author:** ![dragonforge-dev](https://forum.godotengine.org/user_avatar/forum.godotengine.org/dragonforge-dev/32/26042_2.png) [@dragonforge-dev](https://forum.godotengine.org/u/dragonforge-dev)\
**Post date:** [February 8, 2026, 5:25pm UTC](https://forum.godotengine.org/t/input-event-not-working-when-clicking-on-area2d/132899/9 "2026-02-08T17:25:24Z")

</div>

Fair enough. I’ll keep that in mind.

---

<div class="post-metadata">

**Author:** ![melon.li](https://forum.godotengine.org/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@melon.li](https://forum.godotengine.org/u/melon.li)\
**Post date:** [February 8, 2026, 5:40pm UTC](https://forum.godotengine.org/t/input-event-not-working-when-clicking-on-area2d/132899/10 "2026-02-08T17:40:39Z")

</div>

never know there is an option to debug like this, ty!

---

<div class="post-metadata">

**Author:** ![wchc](https://forum.godotengine.org/user_avatar/forum.godotengine.org/wchc/32/40052_2.png) [@wchc](https://forum.godotengine.org/u/wchc)\
**Post date:** [March 31, 2026, 6:00am UTC](https://forum.godotengine.org/t/input-event-not-working-when-clicking-on-area2d/132899/11 "2026-03-31T06:00:42Z")

</div>

Closed on March 31, 2026, 6:00am UTC

This topic was automatically closed after 16 hours. New replies are no longer allowed.
