WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   adding more than 1 action for avatar animation slider control (https://forum.worldviz.com/showthread.php?t=2174)

yak 07-21-2009 11:22 AM

adding more than 1 action for avatar animation slider control
 
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


All times are GMT -7. The time now is 04:47 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC