Download presentation
Presentation is loading. Please wait.
Published byGavin Hodges Modified over 8 years ago
1
Scratch Coordinate & Movements Scratc h Coordinate and Movement
2
JOURNAL: Write an algorithm on how to move the cat down the hall and up the stairs?
3
Handout Coordinate Sheet
4
FIND: X:0, Y:0
5
found: X:0, Y:0 FIND: X:100, Y:0
6
found: X:100, Y:0 FIND: X:0, Y:-100
7
found: X:0, Y:-100 FIND: X:200, Y:100
8
found: X:200, Y:100 FIND: X:-200, Y:150
9
found: X:-200, Y:150 FIND: X:100, Y:-180
10
found: X:100, Y:-180
11
3 Ways to Move in Scratch “Move”, “Go to” and “Glide”
12
Moving in Scratch Move Moves the sprite forward a set number of steps Go to Sets the sprites location to a specific spot Glide Moves the sprite to a specific spot
13
Move Move () Steps Specify the number of steps Each step is 1 pixel The Move block is a “Motion” block Negative steps will cause the sprite to move in the reverse direction
14
Move – Common Uses Moving a sprite forward in an animation Larger steps will make the sprite move faster Smaller steps will make the sprite move slower Making a sprite follow a mouse The sprite will chase the cursor around the screen
15
Go to Go to X: () Y: () The “Go to” block sets the sprite’s X and Y position to the specified amounts. X and Y values are related to the coordinate plane There is no animation in this movement block The “Go to” block is used when a sprite needs to jump to another spot Simplest way to move a sprite around the screen
16
Go to – Common Uses Moving a sprite Sprite will just appear at the indicated location Resetting the sprites location at the beginning of a stage
17
Glide Glide () Secs to X: () Y: () The Glide block moves the sprite steadily to a specified X and Y position The sprite will move in a specified number of seconds Smaller numbers will make the sprite move faster Larger number will make the sprite move slower The Glide block is like the Move block but with more precision
18
Glide – Common Uses Fish moving in a tank Falling objects A sprite moving to another sprite
19
Scratch Examples Log into scratch URL: https://scratch.mit.edu/pro jects/17690143/ Click Green flag Use number keys 1, 2, 3 To show the different movements
20
Direct Instruction All students log into Scratch Create Stage – Upload – baseball.sb Code on following page
21
Baseball Code
22
STAGE: Assignment: apply castle 4 or Brick-Wall-and-Stairs
23
The End
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.