[Closed] Setting biped head rotations
Sorry to post another thread, but since I’m new here and my threads don’t show up right away I can’t add on to my original. In any case, I’ve moved way past that and now am stuck here.
I can get the rotation keys from another object and set rotations using the following script:
rotcont = biped.getnode $ #head
boxholder = $bone02.rotation.controller.keys
for i = 1 to boxholder.count
do
(
Xrot = getKey $bone02.rotation.x_rotation.controller i
Zrot = getKey $bone02.rotation.y_rotation.controller i
Yrot = getKey $bone02.rotation.z_rotation.controller i
myquat = eulerToquat (eulerangles xrot.value -yrot.value zrot.value)
slidertime = Xrot.time
biped.settransform rotcont #rotation myquat true
)
However, my biped head, which otherwise seems to follow (so far) the zrotation first lays on its side and turns 180 degrees around (the “Linda Blair” effect). I’m guessing that to use settransform I first need to get the biped head original transforms and add to them the rotations I want – is this true? And, if so, how do I do this?
If I’m way off track here I’d appreciate help – this time I really do seem to be stuck (I got unstuck the last time because I found the answer in one of the old threads here, but a search this time isn’t revealing anything useful).