Davaaron Posted August 29, 2018 Share Posted August 29, 2018 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. dude78 1 Link to comment Share on other sites More sharing options...
Jorasso Posted August 29, 2018 Share Posted August 29, 2018 Sometime ago @rich wrote a post on the topic: http://www.photonstorm.com/phaser/phaser-coding-tips-8 samme 1 Link to comment Share on other sites More sharing options...
Davaaron Posted August 29, 2018 Author Share Posted August 29, 2018 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 More sharing options...
Recommended Posts