Stabilitron ha scrittoIt will be difficult =)
What do you mean by "throw"?
I want to explode enemy on death. So I throw all bones in random directions.
What do you mean by "weight relationships"?
What do you mean by "connected with weight"?
I call "weight relationships" situation when two bones connected with one sprite (for example body torso). And movement of these bones will deform (stretch and other) body (torso).
The result on random throwing you can see here:
Some of bones thrown normally (legs, hands, head) but some of them ugly deformed attached sprite (body torso).
I want to detect these related bones in code and throw them in same direction to prevent attached sprite deforming.
Harald ha scrittoWhat do you mean by "throw"?
Hello Harald!
Can you tell me how to implement the scattering of bones in different directions?
I only have a problem with stretching sprites.
Its hard to help when we don't clearly know what is going on. All you are showing is a screenshot of a bunch of body parts - we don't know what the character originally looked like, or what is going on. Can you record a video?
It seems to me like you might have some images as meshes, and they are bound to multiple bones. If thats the case, and you are moving the bones, the mesh is still weighted to those bones and will stretch it. If thats whats happening, you probably need to specifically decide which bones need to be moved. AKA if you have a foot image that is a mesh, and is bound to 3 footBones, then instead of making all 3 of those footBones move in random directions, you could instead have all 3 of those footBones parented to a single bone, and only move that bone when the explosion happens
Edit: I can't think of a way to automatically figure out which bones you should 'throw' and which you shouldn't - I would instead create a List for the bones you want to 'throw', and drag in only the correct ones in the Inspector (assuming you're using some sort of Skeleton Utility Bones or something to apply the 'throwing' movement)