Order of _input_event calls

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By askhat

Documentation says input event are propagated in reverse depth-first order:

It seems to be not the case for _input_event calls. Is it a bug or is it intentional? Can it be changed?

Which node are you using?

Zylann | 2019-10-18 12:25

Area2D - CollisionShape2D

askhat | 2019-10-18 12:27

I think the order of nodes that are not Control does not follow this rule, maybe that was raised as an issue at some point but I don’t remember. It should also be noted that _input_event on pickable collision objects can’t even follow this rule in 3D, which was purely based on the fact nodes are drawn first to last. In 3D that makes no sense (and the doc is quite biased on this), the real intention of all this is “what is drawn in front gets input first”, however collision objects don’t seem to follow this rule.

Zylann | 2019-10-18 21:23