Discuss Scratch

Obsolescence
Scratcher
15 posts

How to make sprites glide/spin smoothly?

I ask because I've been thinking about making “edits” on scratch. For context, people usually make edits of their favorite character using images or clips of animation, but sometimes I've seen people let the frames spin, glide, or shake. I want to try making projects like this with my own OCs. I've attempted a project with some gliding in it, but I wouldn't call it “edit” quality. Is there a way to make the gliding smoother?
supergamer10000
Scratcher
1000+ posts

How to make sprites glide/spin smoothly?

You could use multiple glides
glide3secstox:0y:50
glide1secstox:0y:55
glide0.5secstox:0y:58
This code will make it near smooth gliding.
quackdmr
Scratcher
37 posts

How to make sprites glide/spin smoothly?

A really good way to make gliding super smooth

whenclickedforeverchangexbyglidex-xposition/6changeybyglidey-yposition/6

Ignore the rest if you dont want the code explained.

Find the difference between our x position, and the one we want to arrive at. Divide it by 6 so its smooth.

yourwelcome

(ps: you can do this with anything, like rotation. Instead, set it to be
turndegrees
with glidex and glidey as the direction instead of the position, and the
direction
block for the x/y position.
)

Last edited by quackdmr (Oct. 1, 2021 19:42:44)

orangetheory
Scratcher
500+ posts

How to make sprites glide/spin smoothly?

Here is a block that I usually use when making intros to make it glide and spin smoothly.
definesmoothglide:xydirspeedrepeatuntilroundxposition=roundxandroundyposition=roundyandrounddirection=rounddirchangexbyx-xposition/speedchangeybyy-yposition/speedturndir-direction/speeddegreesgotox:xy:ypointindirectiondir

Please note that to make it go faster, the number for the input “speed” should be lower, and to make it go slower the number should be higher.

Hope this helped!
amagamecode
Scratcher
100+ posts

How to make sprites glide/spin smoothly?

If you want to make a sprite that guides to your mouse-pointer, here is the script:
whenclickedforeverpointtowardsmouse-pointermovedistancetomouse-pointer/4steps

Last edited by amagamecode (Feb. 4, 2025 03:41:10)

Powered by DjangoBB