Jump to content
Thanks for getting back @greg886.
After further investigation, this appears to be a situation where you need to know that the animation is going to have physics bodies prior to it's creation. This might be obvious, but there isn't really a silver bullet for adding physics bodies to your objects. Either that, or create a completely separate skeleton which is made up of invisible physics bodies. This option is far from ideal, in that you are essentially duplicating the process that Spine is supposed to be automating.
I did find this thread, which talks a bit about adding/attaching physics bodies to Spine objects. The relevant comment:
What I did was call skeleton:setToSetupPose() and skeleton:updateWorldTransform before adding physics bodies to the skeleton. Then looped through the slots of the skeleton with
- for i,slot in ipairs(skeleton.drawOrder) do physics.addBody(skeleton.images[slot], bodyOptions) end
Community Forum Software by IP.Board