• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GameMaker Spine skeleton attachments question.

Didjargo

Member
When I make an attachment to a Spine skeleton in GMS2, I need to input the xo, yo, and rotation of the attachment. The issue that I continually face is that I have to keep using trial and error to find out what the coordinates need to be in order for it to look right. And even then it is very difficult to find the right placement. I tried to look at Spine itself by placing the image into the slot and copy-pasting the coordinates from there, but it still doesn't work right. Can anyone help me out with this?
 

Didjargo

Member
Seems that whenever I post a problem on these forums, within minutes afterwards the solution comes to me. Maybe typing it out like that helps me figure things out. Aside from needing to go by the "Parent" axes in Spine to get my numbers, apparently GM goes by the size of the image within the sprite and not the entire size of the sprite when factoring in its placement. So frames from the same sprite will appear in seemingly erratic positions while using the same attachment coordinates. My solution to that was to go into the sprite editor, and add a single pixel in the top left and bottom right corner of the image set to an alpha value of 1 (practically invisible). There might be a better solution, but I'm going to go with this for now.
 

Jabbers

Member
Interesting. In GMS 1.x I used to just take the co-ordinates out of the exported Spine file, but I did notice that in 2.x, the attachments were always appearing wonky and set wrong and I had to use trial and error as well. I'll have to try your trick.
 
Top