Motion Bricks

From Catrobat
Jump to: navigation, search

< Back to brick documentation

Watch the videos beside the bricks to get an explaination of the brick functionality.


Place at X:(100) Y: (200):

Brick place at.png

Place the sprite to the specified X and Y position.


Set X to (100)

Brick set x.png

Set the sprite´s X coordinate.


Set Y to (200)

Brick set y.png

Set the sprite´s Y coordinate.


Change X by:

Brick change x.png

Changes the sprite´s X coordinate values by the given increment.


Change Y by:

Brick change y.png

Changes the sprite´s Y coordinate values by the given increment.


Go to (Touch position / Random posiiton / object)

Brick go to.png

The object goes either to the touch posiiton, to a random position (any x/y position on the screen) or to another choosen object.


If on edge, bounce

Brick if edge.png

If touching the edge of the screen it bounces away.


Move 10 steps:

Brick move.png

Move the sprite a certain number of steps (e.g.: 10)


Turn left 15 degrees:

Brick turn left.png

Turns the sprite to the left (counter clockwise) by the specified degrees.


Turn right 15 degrees:

Brick turn right.png

Turn the sprite to the right (clockwise) by the specified degrees.


Point in direction 90 degrees:

Brick point.png

See the direction of the current sprite. (in degrees)


Point towards ______:

Brick point towards.png

Sets the direction of the current sprite regarding another object.


Glide 1 second:

Brick glide.png

Glide within a certain time to the specified X,Y position.


Go back 1 layer:

Brick go back layer.png

Moves the sprite a given number of layers back in the layer stack.


Go to front:

Brick go front.png

Bring the sprite to the frontmost layer so it covers all other sprites with overlapping positions.

Vibration brick

Vibrate for (1) second

Brick vibrate for.png

Let your device vibrate for certain seconds.


Set motion type to


Brick set-motion-type-to-bouncing.png

The object is influenced by gravity, collisions, etc., e.g. a ping-pong ball - collides with other dynamic and fixed sprites

(bounce off)

Brick set-motion-type-to-bounce-off.png

The object is not influenced by gravity, collisions or similar, a „static“ sprite per se, e.g. the floor or an indestructible wall - collides with dynamic sprites only.

(no bouncing)

Brick set-motion-type-to-no-bouncing.png

Physics features are disabled, the default non-physics sprites, e.g. background - does not collide with any other physics object


Set velocity to X: 0.0 Y:0.0 steps/second:

Brick set-velocity-to.png

Sets the object’s velocity along both X and Y axes.


Rotate left 15.0 degrees/second:

Brick rotate-left.png

Sets the object’s counter-clockwise rotational speed in degrees/second.


Rotate right 15 degrees/second:

Brick rotate-right.png

Sets the object’s clockwise rotational speed in degrees/second.


Set gravity for all objects to X: 0.0 Y: -10.0 steps/second²:

Brick set-gravity-for-all.png

Changes the physics world‘s gravity which affects all dynamic physics objects. Both positive and negative values are allowed for gravity on both X and Y axes.


Set mass to 1.0 kilogram:


Determines a object’s mass. Accepted values are 0 and above. Note that increasing an object’s mass will not increase the speed with which it will „fall“ due to gravity


Set bounce factor to 80.0 %:

Brick set-bounce-factor.png

Determines how much of an object‘s energy/velocity is lost (or gained) upon collision with another physics object. Both colliding objects‘ BounceFactors are used to calculate how „violently“ the objects bounce off of each other. Accepted values are 0 and above, factors greater than 1 are also supported. If both colliding objects have a BounceFactor of 0 they do not bounce at all upon collision.


Set friction to 20.0 %:

Brick set-friction-to.png

Determines how fast/easily one physics object can glide along another. Accepted values are between 0 and 1, values greater than 1 are accepted as well. The higher the objects’ friction values, the slower they will glide.