# Rotating Shape

I would like to send shapes like these drifting across the screen as they spin. Rotating the shape changes the direction that the shape moves, of course. I could use a variable to retain the original direction of movement, and retrieve that heading just before using the Move block, so that the shape continues to move in the same direction. However, I wondered if there might be a more elegant way of spinning the shape while it continues to move in a straight line?

I have tried but I did not find out how.

Use change x by and change y by to move the shapes along a line despite their current directions (headings).

@snapenilk I tried using Change X / Change Y to move the shapes, but the "If on Edge, Bounce" block (to keep the shape within the boundaries of the stage) didn't seem to function when using this method. Am I missing something? (Thanks)

only changes the direction if the sprite is touching en edge. Use if <not <touching [edge]>> ... or if <(y position) >= ([top] of [stage])> etc ...
EDIT: I might be wrong; if on edge, bounce may also move the sprite away from the edge.

Alternatively, have dummy practically invisible sprites that don't spin and get them to bounce around the screen.

Then just make each of your main sprites just follow them around

@snapenilk @cymplecy These are both good ideas. Your suggestions stimulated a related approach. I placed a turtle sprite on top of the shape and grouped them. Consequently, the shape moved with turtle. I then moved the turtle to the back layer so that it was hidden by the shape. This allowed the shape on top of the turtle's (metaphorical) back to spin as the turtle carried it across the screen. Thanks for the assist!

You can set rotation style for sprite "don't rotate" (left of sprite name, icon).

Hi, Glen, how about using glide ?

@jens I had forgotten about Glide. It is the perfect block for this application. Thanks!