Discuss Scratch

dragonrider123123
Scratcher
26 posts

How to make a sprite move smoothly

When you are using the arrow keys to control a sprite, how do you make it go smoothly without those annoying little jerks when you use

move () steps

Drives me crazy!!!!!
Please help

Last edited by dragonrider123123 (April 23, 2017 19:01:01)

nilbert
Scratcher
500+ posts

How to make a sprite move smoothly

Try this block:

glide () secs to x: (0) y: (0)
Breck-
Scratcher
100+ posts

How to make a sprite move smoothly

Or try
repeat (10)
change x by (3)
end
RokCoder
Scratcher
1000+ posts

How to make a sprite move smoothly

Unless you're talking about the jerks you get when you use -

when [p arrow v] key pressed

In which case you should be using -

if <key [up arrow v] pressed?> then
end
dragonrider123123
Scratcher
26 posts

How to make a sprite move smoothly

Thank you guys so much! Using a mix of your replies, I now have a perfectly smooth-moving sprite.
Thanks again!



when green flag clicked
forever
if <<key [ v] pressed?> = [yes]> then
move () steps
end
end

Yay!

Tysm!!!!!
-Warbler-
Scratcher
82 posts

How to make a sprite move smoothly

Feel free to use this script I made to help people out, https://scratch.mit.edu/projects/155224858/ It uses velocity to speed up and slow down instead of stopping suddenly. Please credit @-Warbler- if used.

Last edited by -Warbler- (May 4, 2017 15:40:32)

ianwpark
Scratcher
27 posts

How to make a sprite move smoothly

Having trouble? Try this block:

repeat (10)
change x by (5)
end

Or

glide () secs to x: (0) y: (0)


And heck ya


move (1) steps


I can’t wait to see your awesome projects!!

Last edited by ianwpark (Sept. 9, 2020 15:19:03)

joshuaho
Scratcher
1000+ posts

How to make a sprite move smoothly

Hey folks! Thanks for your help! However, this topic is old - so I don't think they're looking for answers anymore. I would suggest looking for newer topics (that still need to be answered) and respond to those instead.

Powered by DjangoBB