# Why image sprites follow canvas touched?

1 Like

Any sprite is like image sprite ?

Work thnk you italo​

2 Likes

I guess you found out already, but “touched any sprite” is true or false only. It doesn’t return the touched sprite id.

1 Like

When two image sprites touch, they always move to two sprite images that touch … how to avoid moving if they touch

your problem is also called “sprite cannibalism”. You can find info and a solution here.

Taifun

every time I give a speed point I confused why the image sprites to move? and when point colled I don’t give the speed image sprites don’t move when they touch

Sorry, I don’t understand what you mean.
Want to show an example?

Example i touch coordinate x 10 y 10 if image follow touch coordinate more or less x5 y5 then speed more slow until to do point x 10 y 10

Still can’t understand what you want. If what you need is to make the sprite speed slow down as it gets closer to the target, then use the blocks I gave in this post: Simple Mathematics

1 Like

Yes like that i mean

Use those blocks in my post to calculate the distance between the sprite and the touched point in the canvas.
If the distance is greater than, let’s say 50, then set the speed to 10.
if it’s lower than 50 but greater than 25, set the speed to 8.
if it’s lower than 25 but greater than 15, set the speed to 4.
Etc, etc.

Play with those values and see which one makes the effect look better.

Work italo thank you​

I got problem now.
Why does the movement move to another point, but it doesn’t look smooth and seems to vibrate in the image of the spirit?

Did you set the sprite interval to 0?

yes I have given interval 0 if given a slow sprite image the more visible the vibration