janko

Hey i need some advice how to do it, i would like to join 2 projects or part of it for example as main skeleton there would be goblin using walk animations and i would like to replace his legs with spine boys and use spineboys leg animation. I would like to replace this part of skeleton and images because skeleton might be different in each project.

i notice data about skeleton is in
skeletonNode->skeleton
and animations are stored in
skeletonNode2->state
i was able to get animations from another project
spAnimation* animation = spSkeletonData_findAnimation(skeletonNode2->state->data->skeletonData, "a_leg");
skeletonNode2->state->data->skeletonData->bones[0]->scaleX = 5;
spAnimationState_addAnimation(skeletonNode->state, 1, animation, 1, 0.0f);
Thanks.
janko
  • Сообщения: 9

Nate

You can see where the data is stored here:
http://esotericsoftware.com/spine/files ... iagram.png

This is a pretty strange use case. Maybe it would be better to leave the skeletons separate and draw one on top of the other. Eg, delete everything but the legs from spineboy and delete the legs from goblins, then draw goblins on top of spineboy.
Аватара пользователя
Nate

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


Вернуться в Runtimes