Setting Up Pivot Points and Assembling Character - Part 1

Sandor Kiss
A free video tutorial from Sandor Kiss
Teaching 600,000+ Students, Performance Marketer
4.3 instructor rating • 131 courses • 781,992 students

Lecture description

In this lecture, we'll discuss the logic behind setting up the pivot points for each of our sprites in the Sprite Editor. We'll start gradually bringing in all the sprites from our Assets folder into the scene and assembling our character.

Learn more from the full course

Simple and Advanced Topics of Animating 2D Characters

A comprehensive and easy to learn guide to make 2D bone-based characters from scratch.

03:31:52 of on-demand video • Updated February 2017

  • Create custom bone-based animated characters in Unity 3d
  • Work with sprite sheets in Unity. We'll cover importing, slicing and setting up the pivot points.
  • Assemble bone based 2D characters, organize all the body parts in Hierarchy and prepare for animating.
  • Create Idle, Walk and Jump animations for your character. We'll make a Jump animation with an interesting technique that involves Blend Trees.
  • Configure transitions between animations in the Animator component.
  • Write a simple controller script that will let our character move on the level and jump.
  • Use ScriptableObject assets to store outfits of your character.
  • Apply outfits from your custom-made assets to your character changing the way he looks.
  • Display extra clothing and decoration items like bracelets, necklaces as a part of your character's outfit.
  • Make characters with joints that will be able to “turn into” differently shaped characters while using the same animations.
English [Auto] Hello everyone and thanks for watching this course. So in the previous lecture we've done some pretty basic stuff that we all do when we start working on a new project which is saving our scene importing some new assets like art into our project. And we also started slicing up all the Spryte sheets that we have. Now what I've done here is I've done all the work in sprites render I've hit apply to apply all the changes to all three of these images and I got rid of all the art that we will not need. So now we can press on any of these little triangles beside our images and we can see which sprites we currently have at our disposal to start making our character. So we have the had the torso. And this way you can actually check that you haven't missed anything like any of the letters or any of those images like animation frames of your character that we don't need. So I left just the essential stuff that we might need in our course later. And now it seems like we have old images here old images here and we can actually start making our character but it's not true. There is another stage before making our character and combining all these parts into one character model. We also have to set up the pivot points. So in order to do that we have to open our sprites editor again and bring it to the center so that you can see better and the philosophy of setting up the pivot points is quite simple so let's check out for example these legs. So the point is that we want to set the pivot point which is this little round Iken or this little circle and we can drag it manually across this image and we want to set it where this body part. So the leg will be attached to the torso or to another body part to which it will be attached to. So that's the logic that we have to follow while we set all these pivot points. So let's check out the pivot points on some other objects for example for this skirt. I know that we want it to be around the waist area of our character and we also want the belts to appear on top of this skirt. So I've said it's a pivot point to be here where the belt should go later for the torso. I wanted to leave the pivot point here in the lower part of the torso. So actually the this process might be called bottom. So instead of saying custom I might set it to bottom here and it means that we can rotate our torso or all the other body parts around the pivot points. So for example if you want to make an animation of your character picking up something from the ground then the spirit point setting will help you in achieving this effect. So for the arms here you have also set up to be hit points in a similar manner. So where this arm will be attached to the torso we have the boot point set up there. And for this lower part of the arm we have the parents just set into the corners of the Spryte. And here as well. So this is the logic behind setting up the pivot points for the neck. It's here in the lower part of the neck and for the had it's in the point where the head attaches itself to the neck. So once you have all the pivot points set up correctly it is absolutely safe to start actually building your character because if you forget about the stage you have to build your character twice so you first bring in all the sprites then you remember that you forgot to set up the pivot points and then you will have to rearrange all the sprites again which is unwanted. So once we have done that we can hit apply because I've changed the placings of several pivot points and I've done that for all these sprites. So now we can just drag them from here into our scene and start assembling our character. So let me just grab a couple of body parts and drag them into the scene for example I can drag this sprite reaches the torso of our character and then I can drag this arm and when this arm attached to the torso as I drag these items into the scene. They start appearing here in the hierarchy which can lead to rename them to make these names more descriptive because three underscore 43 doesn't tell us anything about the body parts. We currently have and we also have another important concept which is the concept of parenting so we can parent one of the sprites to another. And in this case we want to parent this part of the arm to the body. So now if we try to move the body this arm will be attached to the body. And this is exactly what we want and we can continue doing this. So for example we also want to attach the neck to the body so I can drag the neck into our scene. Place it roughly where we wanted to appear on the body of our character and parentage to this body game object which is three under score 44 or to the torso game object. And then we can grab the head and make it a child of our neck neck is three underscore thirty four and I can actually I can drag it not into the scene over here but I can make it a child of our neck like this so I can bring in the head and then if we move the torso the head will be placed unappropriate the end then I can just grab the head and place it where we wanted to be. So we want the had to appear here for example and by doing this you can arrange all these game objects. The only trick that I use that is different from all the other body parts is the legs. So as I already said and we will not make it in this tutorial but you can use this pivot point setting that you've said for the torso to make for example any mention of your character picking up something from the ground and reaching towards something on the ground. So by rotating it in Zed axis you will rotate its torso and that's why I like to make the legs of my character independent of the torso so these legs I'll usually do something like this. I will go to create here in the higher key I'll create another empty game object that I'll call legs. I'll select another two to place this game object appropriately so in this case I want it to appear here where our torso ants and the legs should start. And then these upper parts of the legs I'll parent them to this new legs game object. So I'll place them like this. And maybe when you have the skirt attached to our torso we can readjust the legs a little so for now. I don't know how they should be placed exactly but the logic is simple. If the legs will be attached to the torso and we can try that by dragging the legs on to our torso when we want to reach to something that is on the floor then our legs will also follow. And in this case we don't want that. So I'll leave this set at zero and out on parent the legs from our torso. So currently it is an absolutely separate game object. And in this case we'll be able to rotate our torso and the legs will just be in the same spot. Now the legs and the torso part of our character they are separate game objects in our scene so we can move the torso separately we can move the legs separately and we should probably have some kind of a game object that will be apparent to both of these game objects and let's create another empty game object to create here in hierarchy create an empty game object and let's call this one we can call it character. But I think that it's a nice approach to have several different empty game objects above your character and above the actual stuff that will represent your character graphically. And let me show you what I mean for example for this game object I'll call the aswang front view.