Discuss Scratch

-R4x-
Scratcher
100+ posts

How do I rotate a sprite around the center of the stage

^^^^^^^
Treesdobark
Scratcher
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-
Scratcher
100+ posts

How do I rotate a sprite around the center of the stage

Treesdobark wrote:

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
Scratcher
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:

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
Scratcher
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:

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
Scratcher
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

Last edited by DOORISSTUCK (July 13, 2023 18:18:42)

-R4x-
Scratcher
100+ posts

How do I rotate a sprite around the center of the stage

DOORISSTUCK wrote:

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
New Scratcher
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

when green flag clicked
forever
turn cw (3) degrees
end
QuantumWafflez
New Scratcher
17 posts

How do I rotate a sprite around the center of the stage

QuantumWafflez
New Scratcher
17 posts

How do I rotate a sprite around the center of the stage

wait no someone aready said that sry
jlionbname
Scratcher
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
jlionbname
Scratcher
1 post

How do I rotate a sprite around the center of the stage

Spentinium wrote:

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!
This is another test, to make the y more visible

Powered by DjangoBB