- Edited
Is there a way to check if input is coming from a controller or a keyboard? I want my part of my camera effect only to happen if someone is using a joystick, because a keyboard is always 0 or 1 so it would always trigger this effect.
I thought I had it working, and it did seem to work... but now it doesn't seem so.
This is what I have done to detect keyboard or joystick:
func _input(event: InputEvent) -> void:
if (event is InputEventKey):
keyb = true
else:
keyb = false
func rotate_me(deltaVal):
if (!keyb):
var read_input = Input.get_action_strength("turn_left") - Input.get_action_strength("turn_right")
...
...
rotate_me() is called in the _physics_process().
Edit: Seems to work fine when I'm testing it in Godot (F5 or F6), just not when it's exported to an executable. Why?