godotengine / godot-docs

Godot Engine official documentation
https://docs.godotengine.org
Other
3.96k stars 3.23k forks source link

Art mistake in "Dodge the creeps" first 2d game tutorial #5936

Open chuckdries opened 2 years ago

chuckdries commented 2 years ago

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 and playerGrey_walk2.png should be rotated 90 degrees, as tutorial states

We have the "walk" animation, which shows the player walking to the right.

but 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!

aseiis commented 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?

chuckdries commented 2 years ago

No, because the walk and up animations look identical. The "walk" animation does not go right or left because the sprite is rotated up

chuckdries commented 2 years ago
Screen Shot 2022-07-19 at 5 37 56 PM Screen Shot 2022-07-19 at 5 38 01 PM

See in the "walk" animation the sprites should be facing the right

aseiis commented 2 years ago

Do you mean the little "legs" down the eye, in the "walk" animation, should be rotated +90 degrees clockwise?

chuckdries commented 2 years ago

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)