Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do I rotate a sprite around the center of the stage
- Treesdobark
-
5 posts
How do I rotate a sprite around the center of the stage
when green flag clicked
go to x: (0) y: (0)
forever
Turn 3 degrees left
- -R4x-
-
100+ posts
How do I rotate a sprite around the center of the stage
when green flag clicked
go to x: (0) y: (0)
forever
Turn 3 degrees left
That’s from the center of the stage not around it
Last edited by -R4x- (July 13, 2023 02:30:43)
- PhiPhenomenon
-
500+ posts
How do I rotate a sprite around the center of the stage
You can do this two ways.
One way is to move your sprite off-center and use the script in post number 2:

Or you can keep your sprite centered and use this script:
One way is to move your sprite off-center and use the script in post number 2:

when green flag clicked
go to x: (0) y: (0)
forever
turn cw (3) degrees
end
Or you can keep your sprite centered and use this script:
when green flag clicked
set [dist v] to [50]
forever
go to x: (0) y: (0)
turn cw (3) degrees
move (dist) steps
end
- Spentinium
-
100+ posts
How do I rotate a sprite around the center of the stage
You can use this script I made to rotate around a point:
Simply set (x, y) to (0, 0).
I hope this helps!
define rotate (deg) degrees around (x) (y)
go to x: (((((x position) - (x)) * ([cos v] of (deg))) + (((y position) - (y)) * ([sin v] of (deg)))) + (x)) y: (((((y position) - (y)) * ([cos v] of (deg))) - (((x position) - (x)) * ([sin v] of (deg)))) + (y))
turn cw (deg) degrees
Simply set (x, y) to (0, 0).
I hope this helps!
- DOORISSTUCK
-
22 posts
How do I rotate a sprite around the center of the stage
You can just make another costume and move the sprite to the edge of the costume space
It's not a script I know
It's not a script I know
Last edited by DOORISSTUCK (July 13, 2023 18:18:42)
- -R4x-
-
100+ posts
How do I rotate a sprite around the center of the stage
You can just make another costume and move the sprite to the edge of the costume space
It's not a script I know
The distance and offset changes that’s too many costumes
- QuantumWafflez
-
17 posts
How do I rotate a sprite around the center of the stage
If u want to move around the center like orbiting around the center of screen.
the simplest way i can find is to just go into the costume menu
and move the costume sideways with arrow keys instead of having it centered in that crosshair thing
the simplest way i can find is to just go into the costume menu
and move the costume sideways with arrow keys instead of having it centered in that crosshair thing
when green flag clicked
forever
turn cw (3) degrees
end
- QuantumWafflez
-
17 posts
How do I rotate a sprite around the center of the stage
example of this:
https://scratch.mit.edu/projects/874406275/
https://scratch.mit.edu/projects/874406275/
- QuantumWafflez
-
17 posts
How do I rotate a sprite around the center of the stage
wait no someone aready said that sry
- jlionbname
-
1 post
How do I rotate a sprite around the center of the stage
(((((y position) - (y)) * ( of (deg))) - (((x position) - (x)) * ( of (deg)))) + (y))
idk im looking at what u did cause it went off screen
idk im looking at what u did cause it went off screen
- jlionbname
-
1 post
How do I rotate a sprite around the center of the stage
This is another test, to make the y more visible You can use this script I made to rotate around a point:define rotate (deg) degrees around (x) (y)
go to x: 0 y: (((((y position) - (y)) * ([cos v] of (deg))) - (((x position) - (x)) * ([sin v] of (deg)))) + (y))
turn cw (deg) degrees
Simply set (x, y) to (0, 0).
I hope this helps!
- Discussion Forums
- » Help with Scripts
-
» How do I rotate a sprite around the center of the stage