From e9d926f3ee948d6ba549a0bf6bde774eb3ef7bc2 Mon Sep 17 00:00:00 2001 From: Luna Brovchuk Date: Sun, 1 Oct 2023 17:34:38 +0200 Subject: [PATCH] Limit Ghost's Speed once again --- src/models/enemies/ghost/Ghost.tscn | 1 - src/models/enemies/ghost/ghost.gd | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/models/enemies/ghost/Ghost.tscn b/src/models/enemies/ghost/Ghost.tscn index df33a2d..a763fe5 100644 --- a/src/models/enemies/ghost/Ghost.tscn +++ b/src/models/enemies/ghost/Ghost.tscn @@ -25,7 +25,6 @@ flip_h = true use_parent_material = true frames = ExtResource( 1 ) animation = "idle" -frame = 1 playing = true centered = false diff --git a/src/models/enemies/ghost/ghost.gd b/src/models/enemies/ghost/ghost.gd index b762b41..ec3f8ff 100644 --- a/src/models/enemies/ghost/ghost.gd +++ b/src/models/enemies/ghost/ghost.gd @@ -14,7 +14,7 @@ func _physics_process(delta): var dist = global_position.distance_to(player.global_position) if dist > 25 and dash_target == Vector2.ZERO: $Aim.visible = false - global_position = global_position.move_toward(player.global_position, clamp(dist * delta * speed_multiplier, -8, 8)) + global_position = global_position.move_toward(player.global_position, clamp(dist * delta * speed_multiplier, -2, 2)) else: if dash_target == Vector2.ZERO: var angle = global_position.angle_to_point(player.global_position) + PI