Jump to content

Make sprite follow predefined path


Davaaron
 Share

Recommended Posts

Hi,

 

I'm recording a sprite's position over time and store the values in a json object. The user can move around the sprite to wherever he wants. What I wanna do right now, is "replaying".

So to say, I want the sprite to follow the path which is defined in the json object. Is there a way to do so without using thousands of tweens? When using tweens, the duration is not correct (e.g. I set 200ms and in reality the tweens takes like 500ms). I wanna achieve a 1:1 time replay.

 

Thanks in advance.

Link to comment
Share on other sites

I hoped there is already something implemented like a PathFollower or something similar to that. Thanks for the link. I learned interpolation algorithms in school but I wanted to avoid to implement my own solution to spend time. 

 

Enjoy your day.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...