Thank you, Hackerham and Nate. I have a clearer understanding of the spine and bone animation now.
caizhikun

- 8 juin 2016
- Inscrit 13 mai 2016
Thanks for reponses.
1. If the hero can equip something else, such as helmet , cloak , armors. the solution seems to be not good , the atlas would become very large. I see there is an Attachmenet interfact in spine code ,it seems to fit what I need that attach different armors to different part of the hero's body. But I don't know how to use it. Do is missunderstand the Attachment ?
You mentioned that I can generate a pixmap at runtime and construct an TextureAtlas , the atlas would only contains the attachment images , but how do i merge this atlas to the skeleton's atlas?
atlas = new TextureAtlas(Gdx.files.internal("spineboy/spineboy.atlas")); SkeletonJson json = new SkeletonJson(atlas); // This loads skeleton JSON data, which is stateless. json.setScale(0.6f); // Load the skeleton at 60% the size it was in Spine. SkeletonData skeletonData = json.readSkeletonData(Gdx.files.internal("spineboy/spineboy.json"));
- Modifié
Hi, I am a beginer in spine. I create a game which use libGDX + spine. The player controls a hero to attack monsters. I want the hero to change different weapons or hold a shield. How do i do this with spine 2d.Do I need to put all weapons to the spine atlas and set the active weapon visible and hide all others or any other solution? Thanks.
good , thank you very much.
It looks like a little complicate
, can you post some sample code ? Very appreciate!
- Modifié
Hi. I use spine libgdx runtime. I can scale x,y by get the root bone of the skeleton and scale it. But how do i set a pivot point to scale the skeleton ? thanks.