 Constraints are valuable tools used in the process of rigging. They allow for simple and complex relationships to be formed between bones and between objects. There are two main types of constraints, object constraints and bone constraints. For the most part, bone constraints are functionally just object constraints but assigned to bones. In this video we're going to go over some basic object constraints, but keep in mind most of the concepts and constraints in this video also apply to bone constraints. Now let's go over a few examples of constraints and how to use them. In this video we're going to go over the copy and limit transform constraints. These include for example the copy and limit location constraints. The copy location constraint is a simple one that exists as a way for one object to copy the location values of another object while ignoring the rotation and scale. Let's see how this works. First thing we'll do is add a monkey mesh so we can have an obvious reference or target object. Now let's say we want to have our cube copy the location of the monkey along the x and y axis but not the z axis. This way we can have the cube follow the monkey around but not leave the ground. To do this simply select the cube and go to the constraints tab indicated by this icon of two objects wrapped together. From there open the drop down menu and select copy location. This will create and assign the copy location constraint to the active object you have selected. Now we can go ahead and left click this eyedropper tool next to the object field. This will use our next left click in the viewport as a way to identify the object we want to reference. Let's left click our monkey object. As you can see the cube's own location is copying the monkey's location exactly. If we select our monkey we can move it around to confirm that the cube is indeed constrained to our monkey. But this isn't exactly what we want. We want the cube to not leave the ground but still follow the monkey along the x and y axis. To do this we can select our cube again and go into the copy location constraint settings. Here we can see that there are settings for how to interpret each axis of location data for the target object. Let's go ahead and uncheck the z axis as we know we want the cube to ignore the monkey's z axis location. And there we go. If we move the monkey around now we can see the cube follows the monkey while remaining on the grid floor. Just for fun let's go ahead and see what the invert checkbox does in the copy location constraint. Let's check the z axis back on and then check invert. Looks like we get a very cool mirror effect. The cube is being told to do the opposite of whatever the monkey's z axis location is saying. Flipping it across the origin along the z axis. Now I mentioned the copy location constraint ignores the rotation of the reference object. But that's not entirely true if we change world space to local space. The first drop down here controls which axis data to interpret from the reference object while the second drop down controls which axis data to influence for the selected object. Let's change the first drop down from world space to local space allowing us to reference the monkey's local axis location values instead. As you can see local space takes into consideration the rotation of the object as the local axis of an object depends on which way it's facing. Because our monkey is slightly rotated if we move the monkey along its local x axis the cube will move along the world x axis instead of following it perfectly. Feel free to experiment with these settings further. One more quick thing, let's say we change both of these to world space again and now we really like how the cube is currently right below the monkey at this frame. But we want to remove the constraint so we can animate it freely outside of this frame. Well let's go ahead and remove the constraint by pressing this x icon next to the eyeball icon in the constraints tab of our properties editor. But as you can see if we do that the transformation driven by the copy location constraint is forgotten. This isn't ideal for us so let's undo that with control Z and try something else. Maybe we can slide the influence to zero, no that won't work but you might notice this x icon next to the influence slider. If you hover over it you'll see that it says disable and keep transform. Let's click it. This will bring the influence slider to zero but our cube stays put. This is because it has replaced the cube's original location data with the constraint driven location data we saw before clicking the button. This also means that we can actually remove the constraint with no changes. Location isn't the only transformation value we can copy. The same concepts apply to the copy rotation, copy scale and copy transforms constraints. So what about limiting transformation? That's simple, unlike the copy transformation constraints the limit transformation constraints actually do not require a reference object. Instead they use values inputted by the user. For example let's say we have our monkey and our cube again but our cube is scaled up to be a room of some sort. If we wanted to animate something where we want our monkey to stay strictly within the walls of the room we can do that very easily with a limit location constraint. For this we'll go into wireframe mode so that we can see and select our monkey. We can do that by pressing Z and selecting wireframe from the pie menu. Let's select our monkey and go to the constraints tab in the properties editor. From the drop down menu simply select limit location. At first nothing happens as all of these check marks are disabled. These are used to enable the minimum and maximum values allowed for each axis of location. Just to demonstrate, if we check all of these boxes on you'll notice that trying to move the monkey will no longer work. However if you left click drag the maximum Z value for example you'll notice that suddenly you can move the monkey but only as far as what you set the maximum Z value to. Setting ranges like this is how the limit location constraint works. To achieve our goal of constraining the monkey to stay within the walls of the cube we can do trial and error but there's a way that I find is the quickest. I'll go ahead and demonstrate on the Z axis. First thing we'll do is simply uncheck the box for the axis limit you want to set. In this case we'll start with the Z maximum. By unchecking this we can move the monkey along the Z axis as far as we want. So we'll place the monkey where we approximately want the limit to be. Once placed check the box again. This will snap the monkey back to its limit so then be able to left click drag the maximum Z value until the monkey moves back into the position you brought it to before. Once the monkey stops moving you'll know that you increased the value too much so adjust a bit and you should be able to match your maximum Z value to where you want the monkey to be. Luckily since our cube is the same size all around we can just copy this value for all of the maximum values and add a negative sign in front of all the minimum values. But just keep in mind to adjust these values to your own scene how you see fit. And there we go. As you can see as we move our monkey the walls of the cube appear to be stopping the monkey's movements in all axis directions. But you might notice something a bit weird. If we move the monkey significantly past where it's allowed to go based on the limit location constraint and then we try to move it the other way it'll seem like the monkey takes a while to respond to our actions. This is because the monkey is actually still calculating its true location the location where it's supposed to be if the constraint was not active. In fact we can see this visually if we open up the right hand side quick menu and go to item. This will display our selected objects location data. And as we can see as we move the monkey past the limit of the constraint its true location value continues to change. And in order for it to visibly start moving again in the opposite direction the value of its location data must fall within the range of the limit location constraint. To prevent this invisible transformation simply check this box for transform. Now as you can see even if you try to move the monkey significantly past the limit it responds to moving in the opposite direction immediately. We can further confirm this by again checking the object's location data. As you can see the true location now matches the limit of the constraint. Now let's quickly talk about the difference between working with constraints for bones and objects. Bone constraints work very similarly to the object constraints I've just shown you. In fact they work exactly the same. But there are some important things I should inform you about working with bones and constraints. First and foremost let's set bones as the target object for object constraints. How do you do this? Well let's go ahead and add an armature object into our scene. These as you remember are formed from bones and we can add more bones by going into edit mode. I'm going to select the main bone in edit mode right click and select subdivide. This will give us two bones. Now it's recommended to get into a good habit of naming your bones clearly. So let's go ahead and do that by selecting each bone and going into the green bone icon tab which are the bone properties in the properties editor. At the top here we can left click to rename our bone to whatever we want. I'm going to call the top bone top and the bottom bone bottom. Let's say what we want is for our monkey object to copy the rotation of this top bone here. If we do a copy rotation constraint and set the target to the top bone you can see that it doesn't actually register the top bone but rather sets the target as the armature object. That's because our bone is not an object but rather exists within the armature object similar to how vertices and faces are not objects but exist within mesh objects. And unfortunately the target object must be an object. However, with our armature selected as the target object a bone parameter will appear underneath marked with this bone icon. This is where we can select our top bone from the drop down menu. This is one of the reasons why naming your bones clearly is important as we do not have the eyedropper tool available for this field. If we now select the armature and go into pose mode we can rotate the bone and confirm that the monkey is indeed copying the rotation of the bone. Let's say we want the bone to copy the rotation of the monkey object. That's simple. Let's remove the monkey's copy rotation constraint and then go back into pose mode with our armature object selected. Once we have the bone we want the constraint selected we can add the copy rotation constraint through the constraints tab in the properties editor. Except when we do that it seems the monkey's rotation actually drives the entire armature object's rotation instead of just the bone we had selected. That's because what we added was an object constraint not a bone constraint. To add bone specific constraints you have to go into the bone constraints tab indicated by a blue icon that looks like a bone wrapped to another object. Once here we can correctly add the copy rotation bone constraint to our selected bone and set our target object to the monkey. As you can see the bone now copies the rotation of the monkey correctly. There are a few more transform constraints such as the maintain volume constraint and the limit distance constraint that I recommend experimenting with on your own but we'll also go over these in a different video. I hope this gives you a good overview of how constraints work and how you might use them in your projects.