Table of Contents

Function Definition: pointto()

Parameters

Description

The block points its sprite towards the mouse-pointer. This changes the sprite’s direction and rotates the sprite.

Example

The example demonstrates how to make the sprite follow the mouse in Python.

Code

sprite = Sprite('Tobi')

while True:
  sprite.pointto()
  sprite.move(3)

Output

Read More
All articles loaded
No more articles to load