m (1 revision)
(Fixed the image, ( and ) are removed from the filenames...)
Line 1: Line 1:
 
{{block
 
{{block
 
| name      = Point In Direction ()
 
| name      = Point In Direction ()
| image      = File:Point_in_Direction_()_Block.gif
+
| image      = File:Point_in_Direction_Block.gif
 
| imagewidth = 146
 
| imagewidth = 146
 
| category  = [[Motion Blocks|Motion]]
 
| category  = [[Motion Blocks|Motion]]
Line 8: Line 8:
 
The '''Point In Direction ()''' [[blocks|block]] is a [[Motion Blocks|Motion Block]] and a [[Stack Block]]. The block points its [[sprite]] to the specified value - this changes the sprite's [[direction]]. Besides inputing the wanted number, there is a small drop-down menu with the common numbers:
 
The '''Point In Direction ()''' [[blocks|block]] is a [[Motion Blocks|Motion Block]] and a [[Stack Block]]. The block points its [[sprite]] to the specified value - this changes the sprite's [[direction]]. Besides inputing the wanted number, there is a small drop-down menu with the common numbers:
  
[[File:Point_in_Direction_()_Drop_Down.png]]
+
[[File:Point_in_Direction_Drop_Down.png]]
  
 
There has been some confusion involving the number system due to the fact that 0 is straight up, rather than off to the right (the default direction), and that it uses a -180 to 180 circle rather than a normal 360 degree circle - but so far no changes have been made.
 
There has been some confusion involving the number system due to the fact that 0 is straight up, rather than off to the right (the default direction), and that it uses a -180 to 180 circle rather than a normal 360 degree circle - but so far no changes have been made.

Revision as of 14:46, 15 May 2010

Point In Direction ()
File:Point in Direction Block.gif
Category Motion
Type Stack

The Point In Direction () block is a Motion Block and a Stack Block. The block points its sprite to the specified value - this changes the sprite's direction. Besides inputing the wanted number, there is a small drop-down menu with the common numbers:

File:Point in Direction Drop Down.png

There has been some confusion involving the number system due to the fact that 0 is straight up, rather than off to the right (the default direction), and that it uses a -180 to 180 circle rather than a normal 360 degree circle - but so far no changes have been made.

Common Uses

  • Flipping a sprite

File:Flip script.png

  • Rotating a sprite

File:Jumpy rotation.png

  • If a variable is used to decide the direction, the sprite can point towards an important goal in the project.

File:Pointing in a given direction.png