Inverse Kinematics - Setting Constraints

Inverse Kinematics - Setting Constraints

Flash CS4 Tutorial

 

How to Set Bone Structure Movement Constraints in Flash

 

 

Bones are used to drive character animation or fluid motion such as a flag waving in the wind. They can also be used to simulate wind blown grass or the mechanical articulation of an robotic arm.

Bones are added to objects in multiple ways. It is possible to draw one or more Merge Shape objects, select the entire object, then add the bone structure. For more information on Merge Shapes and adding bones to Merge Shape objects, see topics, Merge Shape and Animating a Flag with Bones.

A second method of adding bones requires that you create your object as a series of Movie Symbols. Once you arrange your Movie Symbols, the bone structure is added with the Bone tool by click-dragging between the symbols. For more information on Movie Symbols, see topic, Movie Symbol Basics.

In this topic we will demonstrate how to set constrain limits on Bone structure to make your character movements more believable. This is the second installment of a three part tutorial. You need to complete the first in the series called Adding Bones to Symbol Objects before you begin this topic. Once you constrain the bones you will want to see the topic, Creating a Walk Cycle with Bones to bring your character to life.

 

Step One

Open your document from the tutorial, Adding Bones to Symbol Objects.

Step Two

Using the Selection tool (v key), click on your character and select the LowerLeftLeg. The entire bone structure appears.

Step Three

Open the Properties panel, Joint: Rotation section.

Step Four

Lower legs rotate from a straight down position to about 135 degrees in a clock-wise direction. Use the Selection tool (v key) to rotate the lower leg to the half way point of the arc.

Step Five

In the Joint: Rotation section, the Enable checkbox should be checked. Click the Constrain checkbox. Default values of -45 and 45 appear along with a graphic at the bone rotation point.

Step Six

Adjust the values in the Properties panel until the joint rotates as expected.

Step Seven

Repeat the process for the upper arm. This Bone should rotate from about 9 o'clock to 11 o'clock in the counter-clockwise direction. Make sure to set the angle at the midway point before clicking the Constrain checkbox

Step Eight

Repeat the process for the other arm.

Step Nine

Using the same techniques, set the rotation angles for the upper and lower legs. Stand in front of a mirror to measure your range of motion for each Bone.

Step Ten

Using the Selection tool (v key), move the various body parts. Notice that the range of motion is limited for each body part. To make your character walk, see the next topic in this three part tutorial, Creating a Walk Cycle with Bones.

Constraining Movement

In addition to constraining rotation, you can also constrain the x and/or y motion of an object. To set the values open the Properties panel (Window > Properties) and click the Joint: X Translation and Joint: Y Translation sections.

A Joint: X Translation constraint is handy for an object that is moving across the floor with a horizontal movement.

Controlling the Pivot Point

To set constraints on a Bone, you must first select the Bone. The Bone's pivot point is at the start of the Bone and all constraints are applied to the Bone's pivot point.