nejlyn

Hello!

I'm using the pixi-spine runtime, based off of spine-ts.

I'm running into some problems with transitioning between animations. I've attached a .gif of the issue. Basically, when switching to the down or sit animation the dog's body overshoots the target position. My code here is really simple:
const animations = ['run', 'walk', 'stand', 'down', 'sit']
if (animations.indexOf(data) !== -1) {
const trackEntry = this.dog.state.setAnimation(0, data, true)
}
I'm also having the problem if I switch to using addAnimation instead of setAnimation. Also, if I select the same animation over and over, the dog will also overshoot before snapping back to the correct pose.

Finding this really odd because in the Spine editor I don't have this problem at all in the Preview pane when switching between animations.

To narrow down the problem, I also put my files into the spine-ts webplayer and am seeing the same issue (I did have to comment out some lines in spine-player.js that ran clearTracks and setToSetupPose so that I could see some sort of transition)

Previously, I wasn't using IK or path constraints at all and did not have this problem. The new version of my file uses both (IK on each paw and the nose, and PC on the tail/back/neck) -- perhaps it's related?

I did do some forum searching and found this post (Snapping Issue) but I think my situation might be different, as I'm not seeing the problem in the spine editor Preview pane and am seeing it in the web player.

Does anyone know what might be going on here?

Thanks!
-Jenny
У вас нет необходимых прав для просмотра вложений в этом сообщении.
nejlyn
  • Сообщения: 4

Nate

When do you call setAnimation using the code you showed? You don't want to call it every frame, only when the animation needs to change. Other than that, since it doesn't happen in Preview it may be a spine-ts bug. If so, can you please email your .spine file and images so we can take a look? contact@esotericsoftware.com
Аватара пользователя
Nate

Nate
  • Сообщения: 9302

nejlyn

Hi Nate,

setAnimation is called in response to the user click event, so definitely not every frame. In this particular scenario all I'm calling every frame is .update with the time delta that's elapsed.

I'll be sending the assets shortly. Thanks so much for looking into this!

-Jenny
nejlyn
  • Сообщения: 4

Nate

Just to follow up, we received your email, thanks! Unfortunately badlogic is out at the moment, but he'll dive into the problem as soon as he is back. We've created an issue to track the problem:
[ts] Animation transition overhooting · #1467
Аватара пользователя
Nate

Nate
  • Сообщения: 9302


Вернуться в Runtimes