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.
That block is for when Firebase Data change. I don’t know how to work with Firebase, sorry. And I don’t understand what this has to do with sprite animations either.
Well, I don’t know what to say. If you have to wait for information to download from Firebase to update the sprite position, then it will not be fast. Like I said, I don’t know how Firebase works, never used it, so I don’t know if that’s going to be fast enough or not.
If it’s possible always use SPEED and HEADING to move sprites instead of calculating x,y.
Set SPEED of sprites to a high number (10 or more).
Keep processes in between frames to the minimum.
I see there’s a lot in that block to process, and it repeats 3 times! Try to find a way of reducing that, check if there’s any unnecessary process that can be made or evaluated after the sprite movement.
You understand your blocks better than anyone. I’m sure you will find the solution.
I have found a way to not lag using time every time set time 0 is very smooth but now I have a problem how do I get to the point calculation of the sprite image using time calculation?
such as image sprites to touch points but do not use speed for image sprites only use the clock timer to subtract or add to points of x y image sprites
I don’t know what kind of movement you want your sprites to perform. The calculations can be anything you want. Post an example of what you want the sprites to do.