What would be the proper way to setup a custom gesture input node?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By indicainkwell
:warning: Old Version Published before Godot 3 was released.

I’m creating a custom node for touch gesture input detection. Would it be better to create a node with signals for the different events or use Input actions and pass the event through the SceneTree?

have you made some progress? I would need swype gesture for a project and i’m starting to implement it, however if you have code already done it it would be really fantastic!
Let me know

Florix | 2016-06-22 01:23

:bust_in_silhouette: Reply From: Hinsbart

If you will re-use/instance that node a lot, I’d use the input action approach.
So you don’t have to worry about connecting to the appropriate signals on every new instance.
On the other hand, the signal approach is more lightweight (performance-wise) I guess.

So… it’s hard to suggest a “proper” way, both are ok.
It depends on how your project is structured, just pick the one that suits you the most.