Hello.
I ask for help.
I added the Spine animation ( version 3.8 ) to my game made on the Corona SDK.
I have 2 questions:
1. To work correctly with the Composer library, I added my display group as the 2nd argument when calling the function:
local skeleton = spine.Skeleton.new(skeletonData,mainGroup)
can this be done?
2. I drew a bounding box around my character in the Spine editor
But for some reason in runtime I have 2 bounding boxes displayed on and under the character.
In the code, I add a bounding box like this:
torso = skeleton:findBone("submarine")
local vertices = skeleton:getAttachment ("bb_submarine", "bb_submarine").vertices
polygon = display.newPolygon(mainGroup, 0, 0, vertices)
polygon:setFillColor(0.5, 0)
polygon.strokeWidth = 5
polygon:setStrokeColor(0, 1, 1, 1)
polygon.yScale = -1
physics.addBody(polygon, "dynamic")
...
...
Update bounding box's position
skeleton.x = polygon.x
skeleton.y = polygon.y
polygon.rotation = - torso.rotation
Why do I get 2 bounding boxes?
I will be happy for any help!