Skip to content

Commit

Permalink
forgot the x-axis for the global_position, whoops.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyanindya committed Jun 23, 2024
1 parent 86e6615 commit b21c985
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/character.gd
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,12 @@ func _move():
var val : float = 0

if _axis == MoveAxis.HORIZONTAL:
val = _destination - global_position / get_parent().main_screen_rect.size.x
val = _destination - global_position.x / get_parent().main_screen_rect.size.x
if val > 0:
_sprite.flip_h = true
# _sprite.play("running")
else:
pass
# _sprite.flip_h = false
_sprite.flip_h = false
# _sprite.play("running")

_moving = true
Expand Down

0 comments on commit b21c985

Please sign in to comment.