- Bearbeitet
[Corona] Creating ragdoll after crash, anyone done this yet?
Wondering if anyone has created the LUA code (for Corona) to turn a spine player/character into a Ragdoll? Would love to see the code re how to do this.
I'm assuming the code would have to (correct me if there is a better way):
- Loop through all bones in the animation at the time of collision
- Create a physics body attached to the bone (or should it be the image?) based on the position/size/rotation of the bone
- Create the necessary Joints between bones/physicsBodies (would have to parse spine json file to work out the parent-child relationships if this is possible?)
If anyone was implemented in the other Runtime languages would still be really interested to see this code, then port to lua/Corona.
Notes:
- Example Corona Lua "ragdoll" - http://coronalabs.com/sample-apps/ragdoll/