diff --git a/game/src/Player/Hook/Hook.gd b/game/src/Player/Hook/Hook.gd index bccd696..0a56986 100644 --- a/game/src/Player/Hook/Hook.gd +++ b/game/src/Player/Hook/Hook.gd @@ -38,7 +38,11 @@ func can_hook() -> bool: func get_aim_direction() -> Vector2: var direction: = Vector2.ZERO - direction = (get_global_mouse_position() - global_position).normalized() + match Settings.controls: + Settings.GAMEPAD: + direction = Utils.get_aim_joystick_direction() + Settings.KBD_MOUSE, _: + direction = (get_global_mouse_position() - global_position).normalized() return direction diff --git a/game/src/Player/Hook/States/Aim.gd b/game/src/Player/Hook/States/Aim.gd index b381e11..72b726d 100644 --- a/game/src/Player/Hook/States/Aim.gd +++ b/game/src/Player/Hook/States/Aim.gd @@ -9,7 +9,7 @@ func unhandled_input(event: InputEvent) -> void: func physics_process(delta: float) -> void: - var cast: Vector2 = owner.get_aim_direction() * owner.ray_cast.cast_to.length() + var cast: Vector2 = owner.get_aim_direction() * owner._radius var angle: = cast.angle() owner.ray_cast.cast_to = cast owner.arrow.rotation = angle