Open chuckdries opened 2 years ago
Not sure to get your point, tell me if I misunderstood ! The player sprite actually rotates both vertically and horizontally. Look at the code
if velocity.x != 0:
$AnimatedSprite.animation = "walk"
$AnimatedSprite.flip_v = false
# See the note below about boolean assignment.
$AnimatedSprite.flip_h = velocity.x < 0
elif velocity.y != 0:
$AnimatedSprite.animation = "up"
$AnimatedSprite.flip_v = velocity.y > 0
It's looking rather good when playing, doesn't it?
No, because the walk and up animations look identical. The "walk" animation does not go right or left because the sprite is rotated up
See in the "walk" animation the sprites should be facing the right
Do you mean the little "legs" down the eye, in the "walk" animation, should be rotated +90 degrees clockwise?
yes. I now realize that the eye is actually pointing a different direction. I just expected the player to work the same way as the mobs and as the player in the 3d version (i.e. it moves the opposite direction of the legs)
Your Godot version: v3.4.4.stable.mono.official [419e713a2]
Issue description: Hello! I'm following the "dodge the creeps" getting started tutorial, and I'm on the "coding the player" section. I've got to the point where the script switches which animation is playing based on the direction, and mirrors the art vertically or horizontally depending on direction as well. The problem is that the tutorial states that the player should point all 4 cardinal directions while moving, but my player never rotates left or right, only up or down. I believe the issue is that the provided art assets
playerGrey_walk1.png
andplayerGrey_walk2.png
should be rotated 90 degrees, as tutorial statesbut the art assets point up and are identical to the
..._up
assets provided.URL to the documentation page: https://docs.godotengine.org/en/stable/getting_started/first_2d_game/03.coding_the_player.html#choosing-animations
I can easily make this change and am happy to contribute it if someone can confirm that that is indeed the way they are supposed to be!