new tuto triggers ready to be setup
This commit is contained in:
@@ -9,6 +9,9 @@ enum GamepadDetectionEvent {
|
||||
static func is_event_gamepad(event: InputEvent) -> GamepadDetectionEvent:
|
||||
if event is InputEventKey || event is InputEventMouseButton:
|
||||
return GamepadDetectionEvent.KEYBOARD
|
||||
elif event is InputEventMouseMotion:
|
||||
if not event.relative.is_zero_approx():
|
||||
return GamepadDetectionEvent.KEYBOARD
|
||||
elif event is InputEventJoypadMotion:
|
||||
if abs(event.axis_value) > 0.5:
|
||||
return GamepadDetectionEvent.GAMEPAD
|
||||
|
||||
Reference in New Issue
Block a user