rounded jumping spider sprite global position

This commit is contained in:
pennyrigate 2023-01-25 21:13:34 -05:00
parent e79f0fff40
commit 6ec28bfae1
3 changed files with 34 additions and 20 deletions

View file

@ -24,6 +24,8 @@ func _physics_process(delta):
if position.x <= startpos.x + (-left_boundary * 8):
direction = 1
if flip_sprite == true: sprite.scale.x = 1
#Round sprite position
sprite.global_position.x = round(sprite.global_position.x)
func _on_AnimationPlayer_animation_finished(anim_name):