aboutsummaryrefslogtreecommitdiff
path: root/client/player/controllable_player.gd
diff options
context:
space:
mode:
Diffstat (limited to 'client/player/controllable_player.gd')
-rw-r--r--client/player/controllable_player.gd11
1 files changed, 9 insertions, 2 deletions
diff --git a/client/player/controllable_player.gd b/client/player/controllable_player.gd
index c291f2a5..f0d573c8 100644
--- a/client/player/controllable_player.gd
+++ b/client/player/controllable_player.gd
@@ -102,6 +102,7 @@ func _process_movement(delta):
update(delta, boost)
if boosting and not was_boosting:
Input.start_joy_vibration(0, 0, input.length(), 0.15)
+ Input.vibrate_handheld(75, input.length() * 0.1)
walking = input.length_squared() > 0.1
position_anim = position_
rotation_anim = rotation_
@@ -170,7 +171,9 @@ func progress(position__: float, speed: float, warn: bool):
if warn:
current_vibration_strength = position__
current_vibration_change = speed
- Input.start_joy_vibration(0, 1 * pow(current_vibration_strength, 3), 0, 0.1)
+ var vibration_strength := pow(current_vibration_strength, 3)
+ Input.start_joy_vibration(0, vibration_strength, 0, 0.1)
+ Input.vibrate_handheld(100, vibration_strength)
vibration_timer.start()
if speed == 0:
current_vibration_strength = 0.
@@ -180,16 +183,20 @@ func _on_vibration_timeout():
current_vibration_strength = clampf(current_vibration_strength + current_vibration_change * 0.1, 0, 1)
if current_vibration_strength == 0.:
return
- Input.start_joy_vibration(0, 1 * pow(current_vibration_strength, 3), 0, 0.1)
+ var vibration_strength := pow(current_vibration_strength, 3)
+ Input.start_joy_vibration(0, vibration_strength, 0, 0.1)
+ Input.vibrate_handheld(100, vibration_strength)
vibration_timer.start()
func put_item(tile: Tile):
super(tile)
Input.start_joy_vibration(0, 0.1, 0.0, 0.075)
+ Input.vibrate_handheld(75, 0.1)
func take_item(tile: Tile):
super(tile)
Input.start_joy_vibration(0, 0.1, 0.0, 0.075)
+ Input.vibrate_handheld(75, 0.1)
func interact():
if not is_input_enabled(): return