Smooth gliding is a movement type where a sprite glides smoothly to another location more smoothly than the glide () secs to ( v) block does. Instead of starting and stopping suddenly, the sprite slows down gradually when it approaches its destination.
Smooth Gliding to a Sprite
To smooth glide to a sprite, use this script:
when gf clicked repeat until <(round (distance to (mouse-pointer v))) = (0)> point towards (mouse-pointer v) move ((distance to (mouse-pointer v)) / (8)) steps end go to (mouse-pointer v)
Smooth Gliding to Coordinates
To smooth glide to coordinates, use this script:
when gf clicked Smooth Glide to x: (. . .::grey reporter) y: (. . .::grey reporter) define Smooth Glide to x: (x) y: (y) repeat until <<(round (x position)) = (x)> and <(round (y position)) = (y)>> change x by (((x) - (x position)) / (8) change y by (((y) - (y position)) / (8) end go to x: (x) y: (y)