Qinxgee Posted April 20, 2023 Share Posted April 20, 2023 Hi! I've run into a problem with my spine implementation. In our application, we have certain animations that vary a bit depending on the orientation of the mobile device, so when the orientation changes, we check if a running animation is affected (by checking the animation name in all tracks), and if so, we start the sibling animation on the same track and set the trackTime to the trackTime of the old animation. When we do this switchover, all events that have already been fired, are fired again. I assume that pixi-spine has some check at every update to fire all events that are set before the current time, unless they have already been fired. When we create the new track, this new track entry is not aware of any events already fired, so all events get fired again. Is there a way to make the new track entry aware of the already fired events? We're currently using pixijs 5.3.12 and pixi-spine 2.1.14 (yeah, I know...) Quote Link to comment Share on other sites More sharing options...
Qinxgee Posted April 25, 2023 Author Share Posted April 25, 2023 If anyone else is having this same issue: it seems to be solved by calling `newAnimation.setAnimationLast(oldAnimation.animationLast)`. I have not seen other side-effects yet, so I'm going with it. It makes sense that on an update, events between animationLast and now are being fired. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.