Procházet zdrojové kódy

:beetle: Fix non-responding walker move

Trigger was based on joy motion.
DricomDragon před 1 rokem
rodič
revize
a46fd94f04
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      first3d/flow/control/local_input/local_input.gd

+ 1 - 1
first3d/flow/control/local_input/local_input.gd

@@ -8,6 +8,6 @@ signal main_action(pressed: bool)
 func _unhandled_input(event: InputEvent) -> void:
 	if event.is_action("jump"):
 		main_action.emit(event.is_pressed())
-	elif event is InputEventJoypadMotion:
+	elif event.is_action("move_left") or event.is_action("move_right") or event.is_action("move_back") or event.is_action("move_forward"):
 		var dir: Vector2 = Input.get_vector("move_left", "move_right", "move_back", "move_forward")
 		dir_changed.emit(dir)