MariuszP

I've found following code in the Animation class.
if (time >= frames[frames.length - 3]) { // Time is after last frame.
bone.x += (bone.data.x + frames[frames.length - 2] - bone.x) * alpha;
bone.y += (bone.data.y + frames[frames.length - 1] - bone.y) * alpha;
return;
}
the point is it break the position of the root bone in my animation. The point is - root bone doesn't have any keyframes. And when this code get's run the bone.x and bone.y gets reseted to 0. And I would like to know what I could change in the animation to avoid this stuff.

Cheers
Mariusz
MariuszP
  • Сообщения: 4

Nate

If your root bone is not keyed, then that code should not be executed on it. Are you sure you haven't keyed the root bone?
Аватара пользователя
Nate

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

MariuszP

I've added the key by accident but then I've removed it. Yet the problem remains.
MariuszP
  • Сообщения: 4

Nate

That seems odd. Maybe you can email the skeleton and animation files as JSON? You don't need to include the images.
contact@esotericsoftware.com
See MixTest in the libgdx runtime, it moves the skeleton without the root bone position being reset. Maybe something is strange with yours though.
Аватара пользователя
Nate

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


Вернуться в Editor