
Note that the 'bone' in my test is actually just a regular point bone (like the. Hope you enjoy Essentially, what this code does is help you in locating a bone from your animation, and then having a GameObject follow that bone. You can find a demonstration of the SkeletonRagdoll2D component in the example scene Spine Examples/Other Examples/SkeletonUtility Ragdoll. Code: Following a Bone (Unity, TK2D) After many fruitless hours, I finally got to the end of the tunnel on this code. If you need to dissect multiple limbs, you would need to adapt the script accordingly. There you can set a starting bone which would be dissected then, and just have to call Apply to enable the detachment and physics. Perhaps the easiest way would be to use the already existing SkeletonRagdoll example component.

The location needs to be updated once before enabling it to provide a smooth transition. Then you would start with the physics and the Override being deactivated during normal play and then activate it when the body part should be cut off and the physics enabled. However, I want to know if there is a better way.There are many ways in which cutting off limbs could be implemented.Ī more complicated way would be to use the SkeletonUtilityBone Create 2D Hinge Chain or Create 3D Hinge Chain button provided in the Inspector to generate a quick physics rig ahead of time that can be modified to your liking. Genco je napisao/la:This solves my problem.
