Compare commits

..

2 Commits

Author SHA1 Message Date
Luna Brovchuk 9a3e6641b2 Merge branch 'main' of http://meowo.cc:3000/meowo/LD54 2023-10-01 17:34:53 +02:00
Luna Brovchuk e9d926f3ee Limit Ghost's Speed once again 2023-10-01 17:34:38 +02:00
2 changed files with 1 additions and 2 deletions

View File

@ -25,7 +25,6 @@ flip_h = true
use_parent_material = true use_parent_material = true
frames = ExtResource( 1 ) frames = ExtResource( 1 )
animation = "idle" animation = "idle"
frame = 1
playing = true playing = true
centered = false centered = false

View File

@ -14,7 +14,7 @@ func _physics_process(delta):
var dist = global_position.distance_to(player.global_position) var dist = global_position.distance_to(player.global_position)
if dist > 25 and dash_target == Vector2.ZERO: if dist > 25 and dash_target == Vector2.ZERO:
$Aim.visible = false $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: else:
if dash_target == Vector2.ZERO: if dash_target == Vector2.ZERO:
var angle = global_position.angle_to_point(player.global_position) + PI var angle = global_position.angle_to_point(player.global_position) + PI