• Runtimes
  • One character, several perspectives-> many CCSkeletal nodes?

Hi guys, I'm having a hard problem which I'm not sure how to solve it properly, please help 🙂

I'm working on a cocos2d game with Spine characters. Each character can be seen from several perspectives (front, back, side). My current solution:

  1. Create separate spine projects for different perspectives of one character
    -> Each character export to several different JSON files and ATLAS files for all of its perspectives

  2. In game, create several CCSkeletalAnimation nodes for each character, show only one at a time (front or back or side), need to sync their position, scale, rotate...

I wonder if there's a better way to handle this situation, please help, thank you very much! 😉

Related Discussions
...

That is a reasonable way to do it. You can have multiple skeletons in one project file, which might make things easier to manage. You can pack everything at once, since an atlas can have multiple pages. Use subdirectories to control what images appear on different pages. More here:
https://github.com/libgdx/libgdx/wiki/Texture-packer
For your character you could use one cocos2d group which has multiple children, each of which is a CCSkeletonAnimation. This way you just position, scale, rotate the group.

Thanks, Nathan! 😃

I'm having same name for images of different perspectives so yes I'll have to put them into subdirectories. Do I have to modified JSON files to add subdirectory name in?

You can use Find and Replace to add a directory prefix to your attachments. The button is at the top of the tree.