tracking constraints are a type of constraint that allows for
one object to point to another object in some way,
instead of copying the values of another object,
tracking constraints take into account the relative
location of the reference object or target object
in relation to the selected object.
Let's go ahead and look at how each of these tracking constraints work.
Keep in mind that all of the constraints and concepts we show
in this video are the same for bone constraints as well.
So let's start with the most basic tracking constraint. The track to constraint
first things first,
because the track to constraint does affect rotation of the object.
Let's use a monkey instead of a cube to make it more obvious.
You can do this by deleting the cube and going to the AD menu,
going to mesh and selecting monkey
from here,
we can select our monkey and go to the
constraints tab in the properties editor to add our constraint
under the dropdown, you can choose track too.
We can already see that we need to input a target object,
this will be our light because it's already in the scene.
We can either select it from the drop down menu or use the
eyedropper tool to left click it in our three D view port.
Immediately the monkey starts to face the light
except that it's not actually facing the light.
It's facing directly away from the light but still
if we move our monkey or are light, it's clear.
It's transformation is taking the lights location into consideration.
So how do we get our monkey to stare at the light object.
Well,
let's go into the track to constraint options and
you'll see a few axes we can choose from.
What does this mean?
Well, these axes correlate to our monkeys, local axes,
but it's not very easy to visualize.
So let's go into our object settings under this orange cube
icon in the properties editor and go down to view port,
display
expanding. This will reveal a couple of checkboxes including access,
check this on and you'll see that we can now see
the axes of our object visually in our view ports.
Now, if we go back to our constraints tab these axes,
letters might make a bit more sense.
For example,
up being the z axis and why being the two axis.
So it's clear that the Y axis is pointing at the light
object and the Z axis is considered up for the object.
Now to face the monkey towards the light,
it should be obvious now that all we need
to do is select the negative Y option instead.
And that's it.
Our monkey now faces the light,
no matter where the monkey or the light are in the scene.
Feel free to play around with the
other settings to better understand the constraint.
But for the most use cases this is all you'll need
let's take a look now at the other related tracking constraints.
That being the locked track constraint.
The stretch to constraint
and the damped track constraint.
Each of these is exactly like the track
to constraint but with some important differences.
The locked track points an object towards a target object but only along one axis.
For example, by adding this to our monkey.
You can see that it now can face the light but will not look up or down or tilt its head.
The lock axes at the bottom of the locked track constraint
refers to the only axis of the constraint object that should be rotating
the stretch to constraint works very similarly to the track to constraint,
with the only main difference being that the object will actually
stretch or contract based on the distance between the two objects.
The object will stretch if it gets pulled past
the location it was at when the constraint was applied
and contract. If it gets pushed closer to the object that is pointing to.
You can however, reset the scale of the object at any time.
With the reset button in the stretch to constraint settings
and volume settings help control how much the shape of
the object should change as it stretches and contracts.
The rest of these settings are typically fine if you lead them at default.
However,
feel free to experiment further with these
settings to better understand the constraint.
The damped track constraint is very similar to the track
to constraint but removes the parameter for the up axis.
Instead, it simply calculates the least amount of rotation needed
to continue pointing at the target object.
This allows it to feel more smooth compared to the track to constraint
but also gives you less control in the orientation of the monkey's head.
Finally, we have the clamp to constraint.
This is not exactly related to the track to constraint,
but allow me to show you what I mean.
Let's just go ahead and add it to our monkey head real quick.
Seems simple enough.
Let's add a target object like we have for all the others
except that we can't. In fact, if we go to the drop down menu,
you'll notice that our options are empty.
That's because the clamp to constraint deals specifically with curve objects,
but what are curves?
Well, curves are smooth,
math driven shapes that can be used as references for a variety of things
to see what they can do with the clamp to constraint.
We can add a curve from the ad menu under curve,
then select busier curve
just to make things more clear.
I'm going to scale this curve up a bit so it's large enough to see
from there,
we can set this new busier curve as the
target object of our clamp to constraint on our monkey
as you can see
the monkey immediately snaps to the curves location
but if we try to move the monkey,
you'll see exactly what the clamp to constraint really does.
It clamps or limits the monkeys location
to follow the curve.
This can be very helpful when trying to keep
an object on a certain path during animation,
checking,
cyclic will even allow the monkey to wrap around after reaching the end of the curve
and feel free to experiment with the axis options
to better understand the constraint.
These are the fundamentals of the tracking constraints in blender.