This tutorial will show you how to make a bone in your armature track another object in the scene, useful for head tracking.
Here’s the final result;
bone tracking tutorial final.blend(192.46 KB)
This tutorial was made with Blender 2.49b.
I tried to target this tutorial at beginners as well but if I didn’t do a good job please let me know.
Setup: I provided a simple scene you can download to follow along with the tutorial.
bone tracking tutorial setup.blend(190.98 KB)
Step 1: Add the tracking bone.
I like to work in side view [ numPad-3 ], and orthographic [ numPad-5 ]
Select the Armature, go into edit mode [tab],
hit [space] than [add bone].
Name the bone “Tracker” hit the [N] key for transform properties.
The bone must be pointing down the +Y axis.
So select the top of the bone and move it down using grab [G] and holding [ctrl] to snap.
Step 2: Add a constraint to the head bone.
Now go into pose mode.
Select the head bone, and add a “ChildOf” constraint.
Setup the constraint like this.
A Copy Rotation constraint also works, but ChildOf works better.
Step 3: Add a dummy action.
In the action editor, add a new action (without any key frames) and name it “dummy”.
Step 4: Add an object to track.
This is already done in the setup file.
I used a cube parented to an empty that continually rotates.
Step 5: Add the python script.
The python script is already included with the setup file and is called: “bone_track.py”
Setup the logic bricks as follows
An always sensor with true pulse enabled.
A python controller with the name of the script.
And an action actuator with the name of the dummy action.
To mix the dummy action with other actions, the dummy must be above all other action actuators.
This is my first tutorial so If there are any problems or inconsistencies, or if you have any suggestions for improvement please let me know.
Maybe the tutorial wasn’t even necessary?
Have fun and I hope this helps someone.