Sprite Lab Documentation

turn  right  degrees
Category:Actions

Rotates a sprite or group of sprites by the selected amount. When used in a behavior, the turn command will give sprite the appearance that it is spinning.

Artist

If this block is being used with Artist, then by default, the sprite that will turn is the artist, as no other sprites can be generated in an Artist lesson. Therefore, this block's Artist version does not allow you to choose which sprite to turn.

Display AreaCode

Examples

Example 1

The toothbrush has been turned to make it look like it is in the sprite’s hand.

Example 2

The artist draws a square.

Syntax

turn

Parameters

NameTypeRequired?Description
sprite

A sprite or group of sprites. Examples of blocks to attach here are sprite name, costume and this/other sprite.

direction

The direction the sprite will rotate, either "left" or "right".

degrees

The amount of rotation in degrees. An integer block can be used here or any other combination of blocks that produces a numerical value. Negative values will reverse the direction of rotation.

Found a bug in the documentation? Let us know at support@code.org.