1
\$\begingroup\$

Hello I have some 2d character in sprite I've rigged to use in Unity 2D.Something like this, with separate body parts. enter image description here Although I've used weights and geometry, these body parts are supposed to move independent of each other, so there is no stretching/blending (or whatever you call it) of the shapes/body parts. Now I've created the rig successfully, I realize that these body parts are no at the order I want, meaning some parts are overlapping others in the wrong order. How should I fix that?

\$\endgroup\$
2
\$\begingroup\$

It's really simple, but Unity changed the interface recently so most of the tutorials weren't helpful and I didn't know what keywords to look up.

So if you click on the sprite image in the asset folder, go to Sprite Editor in the Inspector, then click on skinning editor (at the top left corner), and then you double click on the image for the bones to show. And then click on a bone, and it allows you to edit the depth of each bone. So that's it.

\$\endgroup\$
0
\$\begingroup\$

you would want a seperate game object in the scene for each part. You can use the "order in layer" property on the sprite renderer, or the z value to determine what draws on top of what. You should build your character has a hierarchy of sprites, and use the parent/child relationship to make the objects pivot how you like. For example you can have

bodySprite
  shoulderJoint
    armSprite

In this case body sprite is the body, shoulder joint is located where you want the arm to connect, then the arm is a child of the shoulder joint, and you offset it down so the top of the arm connects with the shoulder. Now if you rotate the shoulder joint, the arm rotates around the shoulder.

\$\endgroup\$
  • \$\begingroup\$ maybe I didn't describe it clear enough and there are multiple ways of doing this, so this is not what I'm asking. But I've figured it out and am writing an answer right now. \$\endgroup\$ – practicemakesperfect Apr 12 at 5:07
  • \$\begingroup\$ I provided a solution but it wasn't clear that you wanted it within the new 2D skinned sprite system. I was merely suggesting to use a different method since this system is new and might be harder to find support for. But if you found a solution for skinned sprite system then by all means you should use it. \$\endgroup\$ – gjh33 Apr 12 at 13:24
  • \$\begingroup\$ Thanks anyway!! \$\endgroup\$ – practicemakesperfect Apr 12 at 14:05
  • \$\begingroup\$ Just posted the answer. \$\endgroup\$ – practicemakesperfect Apr 12 at 14:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.