LOCKSHAPE
Syntax LOCKSHAPE
 
Explanation LOCKSHAPE prevents the turtle's shape from rotating when the turtle turns. This can be convenient when you want the shape to appear in its original orientation, regardless of how you turn the turtle. The command HEADING always reports the true heading of the turtle. Use UNLOCKSHAPE to restore the shape's visual orientation to match its heading.
 
Examples In this example, the turtle wears the shape of a car, which faces the right, even when the turtle itself turns. Enter these instructions to watch the car move slowly towards the right of the screen, then plummet straight down. 

SETSHAPE "Sailboat 
SETH 90 
LOCKSHAPE 
REPEAT 100 [FORWARD 1 WAIT 1] 

RIGHT 90 
REPEAT 20 [FORWARD 3] 

Even though the true heading of the turtle is 180 degrees, the car shape remains at its 90 degree orientation. 

 
UNLOCKSHAPE 

 
UNLOCKSHAPE restores the orientation of the shape that reflects its true heading.

TopIndex