- 수정됨
[AS3 Starling] attach sprite to existing bone
Hi
I'm new to the runtime and i'm trying to attach a hat to my character. Is it any way I can access to the "head" sprite so I can use addChild(hat)?
thanks.
Hi,
It might depend on the indended behaviour. You can grab the slot, then grab the bone (or just grab the bone) and align the hat matrix to the bone's matrix. Or you can create an attachment for the hatslot, which would be your hat image
I'm working in a MMO where players can have different cothes and accesories. The idea is to "wear" the desired accessory. Previously I was using dragonbones but we are trying to switch to spine. I was expecting something like skeleton.getBone("head").sprite.addChild(newImage);
Currently I'm trying skeleton.skeleton.findSlot("head").attachment but is not a displayObject, the same for the Slot
you can create your own attachments, doesn't have to be displayable. I have seen people attach emitters to slots. and then add that attachment to the slot