however when the boss dashes it now looks off since while the boss is lerping to look at me it starts dashing and freezes the lerping and it looks weird
Try @Mondayβs code with an else
-statement:
if dashing == false:
# Smooth rotation
direction = (player.global_position - global_position)
var targetRotation = direction.angle()
rotation = lerp_angle(rotation, targetRotation, rotation_speed * delta)
else:
# Instant rotation
#direction = (player.global_position - global_position)
rotation = direction.angle()
Edit: Whoops. Fixed it!
1 Like
With this code when the boss is dashing itβs not even a dash anymore, it just follows the player with a higher speed and constantly looks at the player.
1 Like
Alright it works. Thank you so much for baring with me for so long. Much appreciated!
1 Like