make multiplayer input consider devices
This commit is contained in:
@@ -39,11 +39,11 @@ func _follow(player: Player, delta: float) -> Vector3:
|
||||
player_offset["floor_height"] = player_position.y
|
||||
player_position.y = player_offset["floor_height"] + Projectile.HEIGHT
|
||||
|
||||
if player.input_mode_is(Inputer.Mode.KB_MOUSE):
|
||||
if Referencer.players_count > 1:
|
||||
player_offset["aim_offset"] = Vector3.ZERO
|
||||
elif player.input_mode_is(Inputer.Mode.KB_MOUSE):
|
||||
player_offset["aim_offset"] = player.aiming.aim_offset
|
||||
elif (
|
||||
player.input_mode_is(Inputer.Mode.CONTROLLER) and Referencer.players_count == 1
|
||||
):
|
||||
elif player.input_mode_is(Inputer.Mode.CONTROLLER):
|
||||
var new_aim_offset := (
|
||||
Vector3.ZERO
|
||||
if player.aiming.aim_input.length() == 0
|
||||
@@ -52,8 +52,6 @@ func _follow(player: Player, delta: float) -> Vector3:
|
||||
player_offset["aim_offset"] = player_offset["aim_offset"].lerp(
|
||||
new_aim_offset, _aim_damping * delta
|
||||
)
|
||||
else:
|
||||
player_offset["aim_offset"] = Vector3.ZERO
|
||||
|
||||
var follow_position := (
|
||||
player_position
|
||||
|
||||
Reference in New Issue
Block a user