Navigation

    CreatiCode Scratch Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • CreatiCode

    The "Points Towards ( )" Block

    2D Blocks
    1
    1
    537
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • info-creaticode
      CreatiCode last edited by admin

       

      Prerequisite

      • Working with Blocks

       

      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:


       

      1 Reply Last reply Reply Quote 0
      • First post
        Last post