The "Points Towards ( )" Block
-
Prerequisite
Description
The “point towards (object)” block is a stack block in the motion category.
How does this block work?
The “point towards (object)” block changes the direction of the current sprite towards a target object. The target object can be the mouse pointer, or any other sprite.
Point towards mouse-pointer
When the “mouse-pointer” option is selected, this block will turn the current sprite towards the mouse-pointer. As shown, after running this block, the mouse is always heading towards the mouse pointer.
Point towards (another sprite)
When a sprite is selected in the dropdown, the sprite will turn towards that sprite.
Note that you need more than one sprite in your project, otherwise there will be no sprite name in the dropdown list.
When the other sprite is hidden
The “Point towards (sprite)” block would still work even if the target sprite is hidden. Please see the example below: