Skip to content

Commit 8fc246a

Browse files
authored
Fix vertical movement sprite in Dodge the Creeps (#1006)
Using rotation in the player node instead of flipping vertically, by doing so the trail is also rotated.
1 parent f954d78 commit 8fc246a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

2d/dodge_the_creeps/Player.gd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,12 @@ func _process(delta):
3737
$AnimatedSprite2D.flip_h = velocity.x < 0
3838
elif velocity.y != 0:
3939
$AnimatedSprite2D.animation = &"up"
40-
$AnimatedSprite2D.flip_v = velocity.y > 0
41-
$Trail.rotation = PI if velocity.y > 0 else 0
40+
rotation = PI if velocity.y > 0 else 0
41+
4242

4343
func start(pos):
4444
position = pos
45+
rotation = 0
4546
show()
4647
$CollisionShape2D.disabled = false
4748

0 commit comments

Comments
 (0)