Code:
import viz
viz.go()
#Initialize avatar
male = viz.add('vcc_male.cfg')
male.setPosition(0,0,5)
male.setEuler(180,0,0)
ANIM = 6
DUR = male.getDuration(ANIM)
#Start animation
male.execute(ANIM)
male.setAnimationSpeed(ANIM,0) #Speed must be set after animation is executed
#Use slider to modify animation time
slider = viz.addSlider(pos=(0.5,0.1,0))
def myslider(pos):
male.setAnimationTime(ANIM,pos*DUR-0.01)
vizact.onslider(slider,myslider)
this is a code that controls the speed of the avater's action by using a slider. what I want to do is have teh avatar perform more than one action . maybe press the 'p' key on the keyboard and that will get eh avatar to pick something up and i can control its speed or press the 'w' to walk and i can control the speed of walking by the same slider control. I tried adding multiple sliders that control different anumation actions but most of tha actions all blend together and cause a glitch....any suggestions....
thanks