Motion Block

Motion blocks are color-coded medium-blue and are used to control a sprite’s movement. They are available only for sprites.

move () stepsThe block moves its sprite forward the specified amount of steps in the direction it is facing. A step is equal to one pixel length. The block actually uses Trigonometry to move in the proper direction, as that is how a computer handles it.
turn () degrees
turn () degrees 2
The blocks turn their sprite the specified amount of degrees clockwise or counter-clockwise (depending on which block is used); this changes the direction the sprite is facing.
point in direction ()The block points its sprite in the specified direction; this rotates the sprite.
point towards ()The block points its sprite towards the mouse-pointer or another sprite depending on its costume center; this changes the sprite's direction and rotates the sprite.
go to x () y ()The block sets its sprite's X and Y position to the specified amounts. This block has no animation in its movement — it is the simplest way to move a sprite around the screen without displaying any animation (i.e. gliding). Therefore, this block is used whenever a sprite needs to jump to another spot.
go to ()The block sets its sprite's X and Y position to that of the mouse-pointer or another sprite — in other words, it moves the sprite to a random position, the mouse-pointer, or another sprite.
glide () secs to x () y ()glide () secs to ()The block moves its sprite steadily to the specified X and Y position in the specified amount of seconds - this is like pointing the sprite in a direction and repeatedly using Move () Steps, but with more precision. A disadvantage of the glide block, however, is that it pauses the script while the sprite is moving, preventing the script from doing other things while the sprite is gliding.
changes x by ()The block moves its sprite costume center's X position by the specified amount
set x to ()The block changes the selected sprite's X position to a specified value.
change y by ()The block moves its sprite's Y position by the specified amount.
set y to ()The block sets its sprite's Y (up and down) position to the specified amount.
if on edge bounceThe block checks to see if its sprite is touching the edge of the screen with the move steps block — and if it is, the sprite will point in a direction that mirrors the direction from which it is coming. It uses a line perpendicular to the edge to determine the reflection angle.
set rotation style ()The block changes the Rotation Style of the sprite in-project. Regardless of the style, the variable direction will still change.
x positionThe block holds its sprite's X position. This block can be displayed as a Stage monitor.
y positionThe block holds its sprite's Y position. This block can be displayed as a Stage monitor.
directionThe block holds its sprite's direction, measured in degrees

This work, “Motion Block”, is a derivative of “Motion Block” by Scratch, used under CC BY-SA 4.0. “Motion Block” is licensed under CC BY-SA 4.0 by STEMpedia.

Content is available under CC BY-SA 4.0 unless otherwise noted.

Related Tutorials, Projects & Documentation
Dabble Home Connected

Getting Started with Dabble

Getting Started with Dabble Introduction Dabble App transforms your Smartphone into a virtual I/O device and lets you control hardware using Bluetooth, communicate with it,…
PictoBlox blocks Scratch how to

Getting Started with PictoBlox

PictoBlox is a programming software based on Scratch, where you can make interactive games, animations or program robots and projects with evive, Arduino, etc..
All articles loaded
No more articles to load
PictoBlox Supported Boards