View Single Post
  #6  
Old 11-30-2004, 03:35 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

(1) What you are doing here seems fine. Are you simply taking a value from the array and applying it to the head rotation? Or, are you doing some calculation with the data each frame? Also, make sure that you are not generating any extra timers. A common problem is starting multiple timers within a timer callback. If this is the case, then the number of timers in your script will be exponentially increasing.

(2) This will definitely cause a lag. Speech actions are only meant to be generated at initialization. Once you generate a speech action, you can reuse it multiple times and on multiple avatars.
Code:
avatar1 = viz.add('male.cfg')
avatar2 = viz.add('male.cfg')
avatar3 = viz.add('male.cfg')

#Generate a speech action
speech = avatar1.speak('speech.wav')

#Make all 3 avatars speak
avatar1.act(speech)
avatar2.act(speech)
avatar3.act(speech)
This will work with all action types, not just speak actions
Reply With Quote