浏览代码

:wrench: Use right trigger to thrust ship

DricomDragon 1 年之前
父节点
当前提交
998a6bd8d5
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      godot/component/control/gamepad/gamepad_control.gd

+ 2 - 2
godot/component/control/gamepad/gamepad_control.gd

@@ -14,8 +14,8 @@ func _unhandled_input(event: InputEvent) -> void:
 		if joyEvent.get_axis() == JOY_AXIS_LEFT_X:
 			_last_dir.x = joyEvent.get_axis_value()
 			dir_changed.emit(_last_dir)
-		elif joyEvent.get_axis() == JOY_AXIS_LEFT_Y:
-			_last_dir.y = -joyEvent.get_axis_value()
+		elif joyEvent.get_axis() == JOY_AXIS_TRIGGER_RIGHT:
+			_last_dir.y = joyEvent.get_axis_value()
 		else:
 			return