Vadym

Hi. PixiJs Game having issues after few animations switches. For example vfx wich are visible in setup pose come becomes visible on switching. Or some assets which becomes hidden only on some animations after few cycles not apearing any more.

A have been asked by Devs to make setup pose same as 1st frame of animation and to hide all vfx in setup pose(like in first frame) to give them possibility to reset state ect.
It seems strange to me) because I thought that setup pose is just for comport of animator, am I wrong? Is it ok for all PIxiJs games? ( After rig I used to change pose a bit and also character usually has different states).
Vadym
  • Сообщения: 32

Nate

Sorry for the delay!

You're right that the setup pose is for the comfort of the animator, though it is also used for other things. The programmer can explicitly reset the bones and slots to the setup pose. When using AnimationState to mix (crossfade) and layer animations, the setup pose can be used as the state to return to when something is not keyed in the animations being applied.

You don't want to key all slots to hide attachments on the first frame of every animation. You want to minimize the number of timelines that need to be applied at runtime, and doing that would add a timeline for each slot. It's not a lot of processing power wasted, but it's completely unnecessary. The programmer can reset the slots when they change animations, if they want, eg:
skeleton.setSlotsToSetupPose();
animState.setAnimation(0, "run", true);
However, even that should be unnecessary. If you are using AnimationState and encountering the wrong attachments being shown, that would be a bug that we'll fix. First, are you using the 3.8 runtimes? If not, that is the first step. If so, can you reproduce the problem using Preview or Skeleton Viewer? If so, please send us the project and instructions on how to reproduce the problem: contact@esotericsoftware.com If you can't reproduce it there, then it could be a problem specifically with spine-ts, which is what Pixi uses. In that case, please ask your programmers to make a simple-as-possible app that shows the problem. Ideally they use spine-ts rather than Pixi, as we don't actually do Pixi ourselves (the Pixi guys integrate our spine-ts runtime).
Аватара пользователя
Nate

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

Vadym

Thank you so much! I will manage that in few days and write you again.
Vadym
  • Сообщения: 32


Вернуться в Runtimes