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

#1 2012-03-22 16:57:07

pi3
Scratcher
Registered: 2011-12-31
Posts: 500+

Glide at the same speed

Is it possible for a sprite to glide to any location, with the exact same speed? I've tried doing this but with no luck.


http://i44.tinypic.com/ofdhc4.jpgThanks FreshStudios!

Offline

 

#2 2012-03-22 17:04:49

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Glide at the same speed

when gf clicked
forever
if<(distance to [target v]) > (3)>
point towards [target v]
move (3) steps
end
end

Last edited by MoreGamesNow (2012-03-23 16:57:27)


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#3 2012-03-22 17:05:16

turkey3
Scratcher
Registered: 2011-12-04
Posts: 500+

Re: Glide at the same speed

To glide to different locations at the same speed brings in some math. Say you are going I glide to a location that is 100 pixels away, and you glide for 2 seconds. The mathematical expression is 100•2, so it's 50 pixels per second. Now say you want to glide 150 pixels at the same speed. You use this equation to find out:

100(2)=150x

I don't know if you know how to solve it, so I'll tell you. You divide by 150 on both sides so now it should look like this:

200/150=x

So once it's solved you will find out that you must glide 1 and 1/3 seconds for it to be the same speed. Hope this helped. This is when that math comes in handy.

Last edited by turkey3 (2012-03-22 17:07:58)

Offline

 

#4 2012-03-23 16:19:10

turkey3
Scratcher
Registered: 2011-12-04
Posts: 500+

Re: Glide at the same speed

In addition to my math equation above, it may just be easier to point and move steps.

Offline

 

#5 2012-03-26 15:09:11

pi3
Scratcher
Registered: 2011-12-31
Posts: 500+

Re: Glide at the same speed

Okay, thanks to both of you.  smile


http://i44.tinypic.com/ofdhc4.jpgThanks FreshStudios!

Offline

 

Board footer