This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-03-02 22:50:11

maki
Scratcher
Registered: 2008-01-21
Posts: 100+

Changing Sprite Center

This would be used for physics simulations mostly.

You could be able to change the center of a sprite's Y and X coordinates. Simple as that. I know you can do this in costumes, but making a ton of different costumes for one sprite just so it can have multiple centers is very tedious and can take a long time if you are simulating an orbit.


Creepers are exceptionally volatile.

Offline

 

#2 2010-03-04 16:48:33

AddZero
Scratcher
Registered: 2007-08-11
Posts: 100+

Re: Changing Sprite Center

Ok, so you mean change all the costume centers of a sprite at once?
That may be a nice feature, but I'm not sure how it could be added easily.

I know it's a pain to change many costume centers.

How I do it:
Let's say I'm importing a bunch of sprites of a guy walking, crouching and jumping...
I want all the object centers at his feet:
Create/edit the costumes in another program, (the gimp, photoshop...)
Make the image size/canvas larger than the image,
Position the guy sprites so that the feet are at the center of the larger image.
I make the background of the sprite a unique solid color like bright purple. (this will let me flood fill (paint bucket) clear later.)
Save as png.
Import the costumes into scratch. (drag onto scratch for many at once.)
Then edit each one and fill the bright purple with clear.

Now regardless of the original costume size (crouching of standing), the object centers are at the guy's feet.


http://scratch.mit.edu/static/icons/buddy/524717_med.png?t=2010-06-15+09%3A48%3A36

Offline

 

Board footer