you can animate more than to. let me explain how to add a bone to my worm as simply as i can:
note: yes x and y get mixed up. just fallow the directions. or skip it and download the blend
1st:
extrude the last bone (Bone.001) up a bit (0.400).
2nd:
extrude that same bone (Bone.001) up again. (1.00)
3rd:
select the new bone, and turn off “con” (in “editing” (f9))
4th:
in the menu right next to the “con” button, select the first bone you made.
that is it for the armature
5th:
duplicate the last object in your actual chain (Cube.003) and move it so that it’s center is at the beginning of the 2 bones you made.
6th:
edit the new object so that it dose not intersect the one you duplicated
7th:
with the new object selected, under object (f7), change the “toObject” value in the rigid body constraint to the name of the previous link in the chain (Cube.003)
done with the dynamics.
8th:
select the armature again. go to logic (f4) and add a new property. call the property “object4”, make it a string, and set the value to “Cube”. than edit the value of the property called “object3” and change it to the name of the new physics object you made. (Cube.004)
9th:
add 2 more properties. called bcx and bcy. (or whatever you want if you can remember it.) keep them as floats.
10th:
in the text window, (shift-f11) add this to the “angles” script:
from GameLogic import *
from math import *
con = getCurrentController()
o = con.getOwner()
def dist(pos,posi):
Z = (posi[2])-(pos[2])
Y = (posi[1])-(pos[1])
X = (posi[0])-(pos[0])
return sqrt((X)*(X) + (Y)*(Y) + (Z)*(Z))
def object(name):
return GameLogic.getCurrentScene().getObjectList()["OB"+name]
o.setPosition(object(o.object1).getPosition())
obj1 = object(o.object1).getPosition()
obj2 = object(o.object2).getPosition()
obj3 = object(o.object3).getPosition()
obj4 = object(o.object4).getPosition() ##<---this is new
dx = obj2[0] - obj1[0]
dy = obj2[1] - obj1[1]
dz = obj2[2] - obj1[2]
o.bax = -degrees(atan2(dx,dy))
o.bay = -degrees(atan2(sqrt(dy*dy + dx*dx),dz))
dx = obj3[0] - obj2[0]
dy = obj3[1] - obj2[1]
dz = obj3[2] - obj2[2]
o.bbx = -degrees(atan2(dx,dy))
o.bby = -degrees(atan2(sqrt(dy*dy + dx*dx),dz))
##
##this is new##
##
dx = obj4[0] - obj3[0]
dy = obj4[1] - obj3[1]
dz = obj4[2] - obj3[2]
o.bcx = -degrees(atan2(dx,dy))
o.bcy = -degrees(atan2(sqrt(dy*dy + dx*dx),dz))
11th:
go into pose mode with the armature, and select the smaller new bone you made. in the action window, make a new action. IMPORTANT: make sure there are no channels besides the ONE bone we are working with. call it “bone3X”
12th:
insert a keyframe for rot at the fallowing frames-values.
frame 1 RotY = -180
frame 91 RotY = -90
frame 181 = RotY = 0
frame 271 = RotY = 90
frame 361 = RotY = 180
13th:
select all the curves in the IPO window (shift f6) and move them back -181 on the x axis.
14th:
repeat 11-13 for the second new bone on the X axis. call the action bone3Y
15th:
add 2 actuators to the armature. connect them to the “and” controller. make them both actions. change “play” to “property” set ones action to bone3X and the property to bcx. set the other to bone3Y and the property bcy.
16th:
just add something to the worm mesh to be skinned onto the new bone. i think thats it…
dizzy yet?
<.blend>