+21622886281
Scratch

Motion Blocks in Scratch

In Scratch, motion blocks are blocks of code that allow you to control the movement of your sprites (characters or objects in your program). You can use motion blocks to move sprites around the stage, change their direction, and make them bounce off the edges of the stage.

Here are some examples of motion blocks in Scratch:

  1. “Move [number] steps” block: This block moves the sprite a certain number of steps in the direction it is facing.
  2. “Turn [direction] [degrees]” block: This block turns the sprite a certain number of degrees to the left or right.
  3. “Go to x: [number] y: [number]” block: This block moves the sprite to a specific position on the stage.
  4. “Glide [number] secs to x: [number] y: [number]” block: This block makes the sprite move smoothly to a specific position on the stage over a certain number of seconds.
  5. “Point in direction [direction]” block: This block changes the direction the sprite is facing.

Motion blocks are an essential part of programming in Scratch, and they allow you to control the movement of your sprites. You can use them to create games, animations, and other interactive programs.

This block moves the sprite 10 steps.

This block rotates the sprite 15° to the right clockwise

This block rotates the sprite 15° to the left counterclockwise.

This block moves the sprite to the location of the mouse pointer or to a random position

This block positions the sprite at the position defined by the x-coordinate and the y-coordinate on the Stage.

This block drags the sprite to a random position on the Stage.

This block drags the sprite to the position defined by the x-coordinate and the y-coordinate on the Stage.

This block allows to direct the sprite in the determined direction. (0 = up, 90 = right, 180 = down, left = -90)

This block modifies the abscissa x of the sprite by the specified value

This block adds the appreciated value to the abscissa x of the sprite.

This block changes the y-coordinate of the sprite by the specified value

This block adds the appreciated value to the y-ordinate of the sprite.

This block rotates the sprite in the opposite direction when it hits the edge of the stage.

this block returns the x-coordinate of the sprite’s position.

this block returns the y-coordinate of the sprite’s position.

This block returns the direction of the sprite (0 => up, 90 => right, 180 => down, -90=> left) .




0 commentaire


Leave a comment

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Scroll to Top