(Redirected from Turn Left () Degrees (block))
Turn Left () Degrees | |
turn left () degrees | |
Category | Motion |
Type | Stack |
Introduced in | 08Jul04 |
Turn Right () Degrees | |
turn right () degrees | |
Category | Motion |
Type | Stack |
The turn () degrees blocks are two Motion blocks and stack blocks. The blocks change their sprite's direction by the specified amount of degrees in the direction indicated. The blocks support any input value, but the sprite's direction will always be between -179 to 180 after it rotates.
The block was known as "turn left ()" in Scratch 08Jul04, before being renamed to "turn left () degrees" in Scratch 01Apr05i.
The Turn Right () Degrees block was known as "turn ()", before being renamed to "turn right ()" in Scratch 08Jul04, then to "turn () degrees" in Scratch 28Feb05, then to "turn right () degrees" in Scratch 01Apr05i.
Like all other motion blocks, this block is not accessible from the stage and will not work if imported from a sprite.
Example Uses
These blocks are commonly used for repeatedly rotating a sprite.
Some common uses for the blocks are:
- Simple rotation — e.g. planets and wheels
forever turn left (15) degrees end
forever turn right (15) degrees end
- Animation (e.g. a waving hand)
repeat (5) turn right (15) degrees end repeat (5) turn left (15) degrees end
- Vehicles that can turn
forever if <key (left arrow v) pressed?> then turn left (3) degrees end if <key (right arrow v) pressed?> then turn right (3) degrees end
Movement based on direction
when green flag clicked forever if <key (right arrow v) pressed?> then turn right (5) degrees end if <key (left arrow v) pressed?> then turn left (5) degrees end move (5) steps
Workaround
- Main article: List of Block Workarounds
The blocks can be replicated by manually setting direction using their values:
point in direction ( ( direction ) - ( amount ) )