In other languages

Help the wiki!

The Scratch Wiki is made by and for Scratchers. Do you want to contribute?

Learn more about joining as an editor!

See discussions in the Community Portal

Turn () Degrees (blocks)

(Redirected from Turn () Degrees (block))

Turn () Degrees
2.0 Turn () Degrees.png
Category Motion
Type Stack

The Turn () Degrees blocks are Motion blocks and Stack blocks. The blocks turn their sprite the specified amount of degrees clockwise or counter-clockwise (depending on which block is used); this changes the direction the sprite is facing.

The blocks use the 360 degrees in a circle.

Example Uses

These blocks are the easiest way to rotate a sprite, unless many costumes are used to give the illusion of rotation or the workaround is used.

Some common uses for the Turn () Degrees blocks:

  • Simple rotation — e.g. planets and wheels
forever
   turn cw (15) degrees
  • Animation — e.g. a waving hand
repeat (5)
   turn cw (15) degrees
end
repeat (5)
   turn ccw (15) degrees
end
  • Vehicles that can turn
forever
   if <key [left arrow v] pressed?> then
      turn ccw (3) degrees
   end
   if <key [right arrow v] pressed?> then
      turn cw (3) degrees
   end

Workaround

Main article: List of Block Workarounds

The blocks can be replicated with the following code:

point in direction ((direction) + (amount))
point in direction ((direction) - (amount))

See Also

  • This page was last modified on 21 October 2015, at 21:23.