Welcome to the forums @Rocha!
I have not tried it myself, but you can use something like this in GDScript to detect double taps in a certain direction:
# I’m storing the data in a dictionary for
# convenience, it’s not required by any means.
var input_forward_data = {
“taps”:0,
“timer”:0,
“reset_time”:1
}
func _process(delta):
# handle the timer.
if input_forward_data[“timer”} > 0:
input_forward_data[“timer”] -= delta
if input_forward_data[“timer”] <= 0:
input_forward_data[“taps”] = 0
# when the forward key is pressed:
if Input.is_action_just_pressed(“Forward”):
input_forward_data[“taps”] += 1
if input_forward_data[“taps”] = 2:
# Double tap detected! Do a roll here!
else:
# Not a double tap. Do normal press things here!
# set the timer going.
if input_forward_data[“timer”] <= 0:
input_forward_data[“timer”] = input_forward_data[“reset_time”]
I only showed the code for forward as an example. There may be simpler, easier ways to handle it, but right off I would try using code like that if I was looking to implement double tap detection in Godot.