Discuss Scratch

WatermelonNinja
Scratcher
9 posts

How do you perfectly center a sprite?

I need to do so to make a rolling circle not looks weird.
deck26
Scratcher
1000+ posts

How do you perfectly center a sprite?

If you draw a square around it so the sides just touch and then make diagonal lines through the corners you'll get a reference point for the centre. Once you've got it as close as you can you can just delete those components assuming you're in vector mode. Zoom in to help centre it and to check the lines.

May be difficult to get it perfect but shouldn't be far off.
deck26
Scratcher
1000+ posts

How do you perfectly center a sprite?

Just tried that and it works well. Make the lines for the square and the diagonals thin so you can line them up as well as possible. Take a copy of the sprite after centering and remove the extra bits for testing. If happy with it just use that copy of the sprite, if not adjust it as necessary but when I tried it was close enough even in full screen mode to be hardly noticeable.
footsocktoe
Scratcher
1000+ posts

How do you perfectly center a sprite?

deck26 wrote:

If you draw a square around it so the sides just touch and then make diagonal lines through the corners you'll get a reference point for the centre. Once you've got it as close as you can you can just delete those components assuming you're in vector mode. Zoom in to help centre it and to check the lines.

May be difficult to get it perfect but shouldn't be far off.


Line up the reference square on the checkerboard around the printed center on the checkerboard. Use lots of zoom. You might not even need the diagonal lines.
The arrow keys will move the square one pixel. You can get it 99% perfect.


SHOOT THE SPACE MONSTERS! ….. A game everyone can play! Bright colors, bonky sounds!
THE 12 BALLS OF CRAZY AL ……. New scrolling adventure game!

K_JAK
Scratcher
3 posts

How do you perfectly center a sprite?

So there's no quick and easy way to do it? .
deck26
Scratcher
1000+ posts

How do you perfectly center a sprite?

K_JAK wrote:

So there's no quick and easy way to do it? .
No
K_JAK
Scratcher
3 posts

How do you perfectly center a sprite?

Dang, i really hope scratch adds that in 3.0
deck26
Scratcher
1000+ posts

How do you perfectly center a sprite?

K_JAK wrote:

Dang, i really hope scratch adds that in 3.0
Not sure how it would work. Where's the centre of an irregular shape? Imagine a crescent moon for example - the arithmetic mid x and y value may give you a value that isn't even on the costume.
OneOrdinaryCoconut
Scratcher
2 posts

How do you perfectly center a sprite?

How do you do it in Scratch 3.0? I haven't found a button for it.
deck26
Scratcher
1000+ posts

How do you perfectly center a sprite?

OneOrdinaryCoconut wrote:

How do you do it in Scratch 3.0? I haven't found a button for it.
There is no button currently but read the responses above which relate to Scratch 3.
R_LAM
Scratcher
1 post

How do you perfectly center a sprite?

So basically we can't center sprites in 3? All my sprites are custom, so I'll need that.
deck26
Scratcher
1000+ posts

How do you perfectly center a sprite?

R_LAM wrote:

So basically we can't center sprites in 3? All my sprites are custom, so I'll need that.
Yes you can. Select the entire costume and move it to where you want it relative to the marked centre.
ariodasavage
Scratcher
3 posts

How do you perfectly center a sprite?

hbuhjnuj
ariodasavage
Scratcher
3 posts

How do you perfectly center a sprite?

very weird!
qaday123
Scratcher
1 post

How do you perfectly center a sprite?

there used to be a center sprite tool, but with the new version of scratch, its gone. Dunno what happened
Luvexina
Scratcher
500+ posts

How do you perfectly center a sprite?

qaday123 wrote:

there used to be a center sprite tool, but with the new version of scratch, its gone. Dunno what happened
The Scratch Team removed it in Scratch 3.0. However, the cross-hairs tool (which you are probably talking about) is highly requested.

Support trans youth, in Texas and across the globe!
porkfeet
Scratcher
1 post

How do you perfectly center a sprite?

how do you center it in scratch
FoofJr
Scratcher
100+ posts

How do you perfectly center a sprite?

Looks like some confusion still, so here's 2 methods


Just draw something in the paint editor (hold shift for perfect circles and squares), and then select it by clicking on it (vector) or dragging around it (bitmap). A crosshairs should pop up and the center of the editor should be visible. If you bring both close enough together, they will snap in place. This method is easier with vector because of the precise selection of objects.

Create your drawing in something like piskel and export as a gif. Then, upload the gif in the costume editor and each frame will become a perfectly centered costume/backdrop.

Why hello there! Wonder why you are checking out my signature. While you're at it, why not check out my Gradient generator?
AARstudios
Scratcher
10 posts

How do you perfectly center a sprite?


AARstudios

when green flag clicked
set [ Scratch] to ((cool) * (10000000))
forever
Imagine, Program, Share
end
jettypumpkin07
Scratcher
1000+ posts

How do you perfectly center a sprite?

There are so many unnecessary posts here. Please don't add any more to this topic.
Also, a new update in 3.0 let's you perfectly center anything in the Vector Editor.
Simply hover over the shape and you'll see a blue cross in the middle,
then drag it to (near) the center of the image and you'll see another cross, which will snap onto your shape.

-jettypumpkin07 Profile ~ GitHub ~ Wiki Edits ~ Stats ~ Posts
I haven't really been active much since 2021. I now mostly look at / help with other people's projects, answer questions on the forums and work on stuff in other programming languages like JavaScript. Scratch is still awesome and I don't think I'll be leaving it any time soon. <3


Check out ocular, a Scratch forum search tool by jeffalo that helps find lost posts, or the Hidden Blocks TurboWarp extension I helped create that has a bunch of useful hacked blocks ready to add to your Scratch projects. (PR for details, see the Hidden Blocks category to the left of the editor.)


Super Mario World Maker 3.0 Update coming soon ~ Suggest what you want added!

The state of my life right now (I'm in Grade 12 next year):

Bonus image for Extension users and Inspect Element bois:

I'm the guy who made the ‘Multiple rows in backpack’ addon btw, you should try it!

Powered by DjangoBB