You can set the direction of a sprite by dragging on the blue handle on the image of the sprite at the top of the middle window. But the direction shown there is not exact, i.e. it is rounded to the nearest whole number. This can produce confusing results, e.g. when you think your sprite is moving exactly to the right (90 degrees), but it's not.
This can be demonstrated by creating a variable called "heading" and using the following simple script:
When Green Flag Clicked
Forever
Set heading to direction
Then try changing the direction of the script by dragging the blue handle.
I can think of two solutions:
a) show the direction to 1 decimal place
b) leave the direction as is, i.e. a whole number, but when dragging the
blue handle, round the actual direction up or down to the nearest whole number.
Method a has the disadvantage that decimal numbers might be confusing to younger children. Also, if you want 90.0 exactly, it's not easy to accomplish that by dragging the blue handle.
Therefore, I prefer Method b. If someone wants a direction that's not a whole number, they can always accomplish this programmatically.
Offline
Thanks for your message. I wasn't aware of this problem. I agree that solution (b) is better -- because, as you note, including decimals in the interface could seem intimidating to beginners.
We will put this on our list of improvements to consider for the next version of Scratch.
Mitch Resnick
MIT Scratch Team
Offline