How can you rotate a shape?

I feel like I should know this, but I haven’t had a student ask before. We are on Unit 3, Lesson 10 and a student wanted to rotate his rectangle. I’m sure it’s really easy, but I couldn’t find an answer on the forum. Thank you!

Hi @buyskej!

You’re about to hit the exact lessons that highlight sprite movement- both the Draw Loop (Lesson 11) and Sprite Movement (Lesson 12). If you go through both of those lessons, you should be good to go as rotation is one of the movements that will be covered. Let me know if you have any questions once you take a look!


Hi @buyskej,

@wendybunker is absolutely correct in where you will learn to rotate sprites. Were you looking for how to rotate a shape? For example: a rectangle? I have had my students ask me this from time to time and we discovered the rotate method/function: rotate(angle); You do have to type it in the text mode. Here is an example.

Hope that helps:)


1 Like

Thanks, @melynn! Appreciate the input!

1 Like

Thank you @melynn! Yes, I was talking about rotating a shape. I do know how to rotate sprites and do all that jazz, but thank you @wendybunker. I also looked back at the Shapes and Parameters challenge level as I think you can create a shape and set multiple x,y coordinates with the shape(x1,y1,x2,y2…xN,yN) block.

1 Like