Phone: 905 409-1589
Email: info@penproductions.ca
RSS LinkedIn Twitter Twitter
Tutorials:
LookAt Constraints:

 

Another method for controlling rotation are lookat constraints. The same principle of lookat constraint is used in target lights and cameras as well as IK solvers. There is a lot more to an IK solver but the same principle is there. Lets use an example of a box at position [0,0,0] looking at a target along its axis. The target is at a position of [100,0,0]. The rotation of the box can now be partially determined. We still need information about one of the other axis. As a default the world Z-axis is used. We now have X and Z so we can use Trig to determine Y. The limitation with this method is when the target object moves to a position closer to that of world Z and we begin to see gimble lock. Lookat constraints allow for an upnode to be selected that will help with problems of gimble lock, we an then animate the upnode as well as the target to avoid the flipping that can occur. The end result is that the target object controls the rotation about the Y and Z-axis and upnode controls the rotation about the X-axis.

IK solvers use a similar method to control the rotation about the first joint. Lets use a one bone solver to represent this. In the case of a bone chain the X-axis tries to point at the goal end of the solver, and the position of the goal determine the rotation of the bone around the Y and Z-axis. The rotation of the X-axis is controlled in one of two ways. As a default the rotation about the X-axis is set to start joint. The start joint will use the rotation of the bones parent object. If you set it to IK goal the X-axis rotation will be controlled by the parent of the IK solver. If there no parent object in either case the world axis is considered parent.

You can also offset the angle around the X-axis using the swivel angle. This can be controlled by changing the swivel angle value or assigning it to target object. The target in this case works much the same as the upnode does in the lookat constraint. Once you have applied a target for the swivel angle the settings for IK goal and start joint are ignored.