I have two animated sprites running at the same time.
I have an array that iterates over them and runs goToAndPlay(0) on both of them.
The both of them more or less happen at the same time except one always finishes first. So there is a split second where they are out of sync.
I don't know if this has to do with renderer settings or buffering, which are all more or less the default settings.
If there's an obvious answer please let me know, otherwise close this issue. It may not be very useful to people helping me debug without code.
Its strange. AnimatedSprite uses "PIXI.ticker.shared" which is emitting the same delta time to all listeners. The priority of this operation is higher than rendering, so render cant stick between two updates. Default settings should work.
Need to debug "animatedSprite._currentTime" and "animatedSprite.currentFrame" of both sprites.
Is it possible @hassanshaikley to create a JSFiddle which reproduces this issue?
@bigtimebuddy I can't do a JS Fiddle, it could end up being too complicated to set up but I do have this hosted although it is very much an in-pre alpha project.
I wonder if it has anything to do with buffering?
Notice when you run the arm is visible for a split second when the shield goes from behind the unit to infront of the unit.
@ivanpopelyshev that helps me understand which direction to go in as I debug, thank you! I feel really screwed haha
@ivanpopelyshev so they are slightly out of sync, by one frame!! The base animation and the shield animation. I start them like this:
this.allAnimations.forEach((thing) => {
thing.gotoAndPlay(0);
});
This could be starting them late. How do I start them at the same time? : (
I suppose I am trying to have one AnimatedSprite container for many animated sprites. I am trying to do this to make sure they run in sync but so far no luck. I will keep trying.
I still think that "out of sync" is actual bug. Plesae make a fiddle.
So when I print the _currentTime of two of the animations I can see one trail off and fall out of sync.... : (

Then its a bug, lets find it
@hassanshaikley Sorry for a delay in getting back to you... is this something you found a way around or found a solution for?
I found a work around.
However this does seem like a bug to me? I will try to upload some code later for you guys to look at as it is sort of a pain to deal with. I wish I did that before creating the PR. @themoonrat
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.