Motion Blocks in Scratch are special programming blocks that control how sprites (characters or objects) move on the Stage. These blocks are blue in color and found in the Motion category of the Block Palette. Understanding Motion Blocks is essential for creating animations, games, and interactive projects in Scratch. They help sprites move in different directions, change positions, rotate, and glide smoothly across the screen.
1. Types of Motion Blocks
Motion Blocks in Scratch are divided into different types based on their function. Each block performs a specific movement action.
1.1 Movement Blocks
These blocks make sprites move on the Stage in various ways.
- Move [10] steps: This block moves the sprite forward in the direction it is facing. The number inside the block determines how many steps the sprite moves. Default value is 10 steps.
- Turn right [15] degrees: This block rotates the sprite clockwise by the specified number of degrees. Default rotation is 15 degrees.
- Turn left [15] degrees: This block rotates the sprite counterclockwise (anti-clockwise) by the specified number of degrees.
- Go to [random position/mouse-pointer/sprite]: This block instantly moves the sprite to a specified location without animation. It can go to a random position, mouse pointer location, or another sprite's position.
1.2 Position Setting Blocks
These blocks set the exact position of a sprite using coordinates (x and y values). The Stage uses a coordinate system where the center is (0, 0).
- Go to x: [0] y: [0]: This block moves the sprite to specific x and y coordinates on the Stage instantly. The center of the Stage is x=0, y=0.
- Glide [1] secs to [random position/mouse-pointer/sprite]: This block makes the sprite move smoothly to a destination over a specified time period. It creates animated movement instead of instant teleportation.
- Glide [1] secs to x: [0] y: [0]: Similar to the above block, but moves to specific coordinates with smooth animation.
- Set x to [0]: This block changes only the horizontal (x) position of the sprite without affecting its vertical (y) position.
- Set y to [0]: This block changes only the vertical (y) position of the sprite without affecting its horizontal (x) position.
- Change x by [10]: This block increases or decreases the x-coordinate by a specified value. Positive values move right, negative values move left.
- Change y by [10]: This block increases or decreases the y-coordinate by a specified value. Positive values move up, negative values move down.
1.3 Direction and Rotation Blocks
These blocks control which way the sprite is facing and how it rotates.
- Point in direction [90]: This block sets the sprite to face a specific direction. 0 degrees is up, 90 degrees is right, 180 degrees is down, and -90 degrees (or 270) is left.
- Point towards [mouse-pointer/sprite]: This block makes the sprite turn to face the mouse pointer or another sprite automatically.
- Set rotation style [left-right/all around/don't rotate]: This block controls how the sprite rotates. "Left-right" flips the sprite horizontally, "all around" allows full rotation, and "don't rotate" keeps the sprite upright.
1.4 Reporter Blocks (Information Blocks)
These are rounded blocks that report (provide) information about the sprite's current position and direction. They cannot be used alone but fit inside other blocks.
- x position: Reports the current x-coordinate of the sprite on the Stage.
- y position: Reports the current y-coordinate of the sprite on the Stage.
- direction: Reports the current direction the sprite is facing in degrees.
2. Scratch Coordinate System
Understanding the coordinate system is crucial for using Motion Blocks effectively. Scratch uses a standard x-y coordinate plane.
2.1 Stage Dimensions
- The Scratch Stage is 480 units wide (x-axis ranges from -240 to +240)
- The Scratch Stage is 360 units tall (y-axis ranges from -180 to +180)
- The center of the Stage has coordinates (0, 0)
- The top-right corner has coordinates (240, 180)
- The bottom-left corner has coordinates (-240, -180)
2.2 Direction System
- 0 degrees: Points upward (North)
- 90 degrees: Points to the right (East)
- 180 degrees or -180 degrees: Points downward (South)
- -90 degrees or 270 degrees: Points to the left (West)
- Positive rotation values turn clockwise, negative rotation values turn counterclockwise
3. Common Motion Block Combinations
Motion Blocks are often combined to create complex movements and behaviors in Scratch projects.
3.1 Creating Continuous Movement
To make a sprite move continuously, Motion Blocks are placed inside control blocks like Forever loops.
- Example 1: Place "move 10 steps" inside a "forever" loop to make a sprite move forward continuously
- Example 2: Combine "move 5 steps" with "if on edge, bounce" inside a "forever" loop to create bouncing movement
- Example 3: Use "change x by 5" inside a "forever" loop for horizontal scrolling movement
3.2 Controlled Movement with Keyboard Input
Motion Blocks combined with Events and Control blocks create keyboard-controlled sprites.
- Use "when [space] key pressed" event with "move 10 steps" to move on key press
- Use "if [up arrow] key pressed then change y by 5" for upward movement
- Use "if [left arrow] key pressed then change x by -5" for leftward movement
- Combine multiple direction checks inside a "forever" loop for smooth 4-directional control
3.3 Smooth Animation with Glide
The Glide blocks create smooth, animated movement instead of instant jumps.
- "Glide 1 secs to x: 100 y: 50" moves the sprite smoothly to coordinates (100, 50) over 1 second
- Longer glide times (2-3 seconds) create slower, more dramatic movements
- Shorter glide times (0.5 seconds) create faster movements
- Glide blocks automatically calculate the path and speed needed
4. Special Features of Motion Blocks
Motion Blocks have several important characteristics that affect how sprites behave in projects.
4.1 If on Edge, Bounce
This special block prevents sprites from moving off the Stage completely.
- When a sprite reaches the edge of the Stage, this block automatically reverses its direction
- Commonly used in games where objects should stay visible on screen
- Works by detecting Stage boundaries and changing the sprite's direction by 180 degrees
- Must be placed inside a loop to work continuously during movement
4.2 Rotation Styles
The set rotation style block controls how sprite images rotate when direction changes.
- All around: Sprite image rotates completely in all directions (360 degrees). Best for objects like arrows, airplanes, or rockets.
- Left-right: Sprite flips horizontally when moving left or right but doesn't rotate up or down. Best for characters that walk sideways.
- Don't rotate: Sprite image stays upright regardless of direction value. Best for objects that should always face forward like cars in top-down view.
5. Common Student Mistakes and Trap Alerts
Understanding these common errors helps avoid confusion when working with Motion Blocks.
5.1 Confusing Move vs. Change Position
- Trap Alert: "Move 10 steps" moves in the direction the sprite is facing, while "change x by 10" always moves horizontally regardless of sprite direction
- "Move steps" depends on the sprite's current direction setting
- "Change x" and "change y" always work in absolute Stage coordinates
- Use "move steps" for directional movement and "change x/y" for fixed-axis movement
5.2 Negative Values
- Trap Alert: Negative values in "change x by" move left, not right. Negative values in "change y by" move down, not up.
- "Move -10 steps" makes the sprite move backward (opposite to its facing direction)
- Negative degrees in direction can be confusing: -90 degrees is the same as 270 degrees (both point left)
5.3 Glide vs. Go To
- Trap Alert: "Go to" moves instantly (teleports), while "glide" creates smooth animated movement over time
- Glide blocks pause the script until the movement completes
- "Go to" blocks execute immediately and move to the next block
- For animations, always use glide; for instant resets, use go to
5.4 Stage Boundaries
- Trap Alert: Sprites can move beyond visible Stage boundaries if "if on edge, bounce" is not used
- Sprites don't automatically stop at Stage edges; they continue moving off-screen
- Off-screen sprites are still active but invisible to users
- Always use boundary checking in continuous movement scripts
6. Practical Applications in Projects
Motion Blocks are essential building blocks for various types of Scratch projects.
6.1 Animation Projects
- Use glide blocks to move characters smoothly across scenes
- Combine "point towards" with movement to make characters follow each other
- Use "go to x: y:" to reset sprite positions between scenes
- Create walking animations by changing costumes while moving
6.2 Game Projects
- Keyboard-controlled player characters using "change x" and "change y" with key detection
- Enemy sprites that chase the player using "point towards" and "move steps"
- Bouncing balls using "move steps" with "if on edge, bounce"
- Maze navigation using position detection and movement control
6.3 Simulation Projects
- Circular motion by continuously changing direction and moving
- Random movement patterns using "go to random position"
- Following paths by gliding to multiple coordinate points in sequence
- Orbital motion by combining rotation and position changes
Motion Blocks form the foundation of sprite movement in Scratch programming. Mastering these blocks enables you to create engaging animations, interactive games, and complex simulations. Remember that Motion Blocks work with the coordinate system (x and y values) and direction system (degrees). Practice combining Motion Blocks with Control Blocks, Events, and Sensing Blocks to create sophisticated sprite behaviors. Always consider rotation style settings and Stage boundaries when designing movement patterns for your projects.