Demystifying the Aim Constraint
Out of all the constraints in Maya the aim constraint seems to give beginners the most headaches. This is most likely due to the fact that there is little explanation of this concept of “Up”. The best way to think of “Up” is not the physical direction but as a vector in space.
Anything that rotates is Maya (and all 3d apps for that matter) gets this rotation from three vectors. These three vectors all have a length of one and are at 90degree angles to one another These vectors are calculated In such a way as to produce the rotation of the object.
In Maya you can visualize these vectors in several ways;
Through the main menu:
display > Transform Display > Local Rotation Axis
Through the attribute editor:
In the attribute editor under the Display tab. Toggle “Display Local Axis”
you can also do this though commands:
mel:
setAttr “locator1.displayLocalAxis” 1;
python:
cmds.setAttr(“locator1.displayLocalAxis”, True)
What we mean when we say “Up” is really “what axis should we use for the cross product”. What is the cross product you ask? By taking the cross product of two vectors that are a length of one and are at 90 degrees to one another we get a third vector that is also one unit in length and 90 degrees to both input vectors.
That was all pretty heady lets look at some examples:
here is the aim constraint option box:
This is a lot of info so we will step through it one at a time. Aim Vector is the axis we want to point at our target. The first field is x, second y third z. (this is true for almost all three field inputs in Maya). The up vector field is what we’ve explained previously. It is the axis that we will use to define the third axis vector. So Maya defaults to aiming the x axis at the target and uses the y axis to calculate the z axis.
The next three fields work together to place the up vector. Think of this as telling what is in the “Up vector” field were to go.
Here are the default settings. We are aiming the x axis at our target and telling the y axis to point up in y.
here is another example were we are telling our y axis to point in x:
Now what if we want to change were out “Up” is pointing. In these two examples the up placement is static. By using the “Object Up” and “Object Rotation Up” options we can define the position of our up vector.
I this example we use “Object Up” and specify an object in the scene. The “up” vector will now always aim to this object. The rotation of the object in this example is irrelevant.
I the next example the “Object Rotation Up” is now being used with the same object. We can see here that the orientation of the y axis of the aiming object now matches the x axis of “World up object”. The position of the object in this example is irrelevant.
By effectively controlling the “up” of an aiming object you have options that far exceed the capability of the more simple point, orient and scale constraints.
CHEERS
B.










