tinto22 Posted January 9, 2020 Share Posted January 9, 2020 Hi, I'm using Pixi, Spine and https://github.com/pixijs/pixi-spine. I've been reading through the code but can't see a way to attach a Spine sprite to another Spine sprite's bone/slot. Is this possible? I have been able to swap out an attachment for another Texture, but not another sprite. The use case is that we'd like our player sprite (a Spine sprite) to be able to hold weapons which are another Spine sprite, where the weapon can be swapped in and out. This seems like it would be a fairly common use-case, so I feel like I'm just missing how to do it. If it's not possible, are there other ways people have done this in the past with Spine? Thanks for any help anybody can offer. ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted January 10, 2020 Share Posted January 10, 2020 (edited) Spine instance as certain way to manage containers and sprites inside. Its described in https://github.com/pixijs/pixi-spine/blob/master/src/Spine.ts . It is not obvious which things can be controlled by something else, what if spine runtime just deletes your sprite? That's why excurse in source code is needed anyway. Its good that you already read it. Yes, There were cases like that, but people who used it did not report back and did not make PR to add it to examples: https://github.com/pixijs/pixi-spine/tree/master/examples Basically, you need to take container with same number as slot id and put your sprite there. If you succeed, please report back Welcome to the forums! Edited January 10, 2020 by ivan.popelyshev Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.