SkeletonAttachment itself just holds the skeleton instance, its the renderer that does the magic. I just fixed a bug with the attached skeleton positioning and committed a test, SkeletonAttachmentTest. It shows spineboy with a goblin for an arm, sorry we don't have better example animations for skeleton attachment at the moment!
[Feature Request] Nested Animations
no worries on the demo, Ill pull the latest code. This woudl be quite exciting if you were able to resolve it this quickly!
Is there any updates on this, or a link to the demo on how to use it?
Would be really useful to nest some skeletons.
Only in spine-libgdx. You can use it as an example for the other runtimes.
Please, give this feature life. It's going to be much nicer to have support out of the box.
Hi, Nate!
Is there any updates on this?
I spent a few days to implement it, but it still doesn't work.
I had done some codes according to spine-libgdx runtime.
//one skeleton
SkeletonAnimation* _heroSprite = SkeletonAnimation::createWithFile("mage_spine.json", "mage_skin1_spine_sheet.atlas", 1.0f);
this->addChild(_heroSprite);
_heroSprite->setToSetupPose();
_heroSprite->setAnimation(0, "move", true);
//another skeleton
SkeletonAnimation* _firefx = SkeletonAnimation::createWithFile("mage_fire_spine.json", "mage_skin1_spine_sheet.atlas", 1.0f);
_firefx->setAnimation(0, "move", true);
spSlot* slot = _heroSprite->findSlot("bone4");
spAttachment* temp = _firefx->findSlot("bone4")->attachment;
spSlot_setAttachment(slot,temp);
"firefx" will be shown with "heroSprite", but it haven't been animated moving.
Can you give me some ideas?
Thanks.
are you guys planning to add SkeletonAttachmen class to as3/starling? any hints how can I add it myself for now?
cheers!
It's definitely planned, but as far as a time frame I really can't say, sorry
is it supported now?
where can i find an example for the ts runtimes?
hh_x Note that replying to a 10 year old thread is not a good idea. There have been so many improvements since then that it would be confusing to talk in a thread based on such old information.
Most runtimes can already do what Nate described, but it may not be called SkeletonAttachment, or it may be a combination of methods rather than a single useful function to achieve a similar effect. I think it should be possible to accomplish this by using Skeleton findBone()
in the general API to find a bone and update the position of another skeleton or its container based on that bone's transform such as worldX, worldY, and rotation.
See the README.md for information on how to see the examples of the spine-ts runtime:
EsotericSoftware/spine-runtimestree/4.2/spine-ts#examples