1

enter image description here

Above you can see my Scratch workspace where the ship on the left is upside down when it is running, and IT IS THE SAME CODE.

Is it a bug of scratch or some kind of other problem?

Jake Symons
  • 468
  • 2
  • 10
  • 19
vic97192
  • 63
  • 1
  • 1
  • 8

2 Answers2

1

Make sure that the sprite is set to don't rotate in the info tab
Alternatively, you can add the set rotation style to (don't rotate).
It will make the sprite no longer rotate all around.
Otherwise, if you want to make it look like it is walking rather than just looking in a direction while walking, replace the parameter don't rotate to left-right

Account_2
  • 53
  • 6
0

I use Scratch 2 for kids programming classes and as a beginner at this object, at first I had the same problem that confused me a lot as to what would provoke the Sprite to turn around.

It turned out that Scratch makes the character rotate when it bounces off the edge (I guess that the reason is not functional).

Anyway to solve it I added the move->set rotation style (don't rotate) before (the position doesn't matter, could as well place it after) the if on edge bounce block.

enter image description here

Efthimis_28
  • 333
  • 1
  • 6
  • 15
  • 1
    I would move the `set rotation style "don't rotate"` block before the `forever` block. If you set the rotation style for a certain sprite then the scratch program will remember that until it becomes changed again by another set rotation style block. So there is no need to set it each time within the forever loop. see also https://en.scratch-wiki.info/wiki/Set_Rotation_Style_()_(block) – JanVdA May 29 '18 at 07:47
  • 1
    Rotation style can also be specified directly in the sprite header pane, as explained in the [wiki](https://en.scratch-wiki.info/wiki/Rotation_Style). I hardly ever use the [block](https://en.scratch-wiki.info/wiki/Set_Rotation_Style_()_(block)), but it does have its benefits: it makes your intentions more explicit, and it makes it possible to change rotation style halfway through the project. – Ruud Helderman Feb 27 '19 at 10:37