View Single Post
  #4  
Old 04-01-2009, 07:24 PM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
To find out what orientation the animation has the head at unlock the bone, then call bone.getEuler(), then lock the bone again.

Also, I think it might be a bit more complicated than getting the bone orientation then calling vizact.headto(). This is because the head orientation will have changed by the time the headto action is done.

You could manually blend the head back. The vizmat.interpolate fuction will come in handy. It could go something like the following fake code:

Code:
while not isDone:
    currentEuler = bone.getEuler()
    bone.unlock()
    targetEuler = bone.getEuler()
    bone.lock()
    eulerBlendy = vizmat.interpolate(currentEuler, targetEuler, percentDone)
    bone.setEuler(eulerBlendy)
__________________
Paul Elliott
WorldViz LLC
Reply With Quote