![]() |
|
#2
|
|||
|
|||
|
That code is adding a spin action to the object when the slider is moved. If you want to move through an avatar animation using the slider, the following code should help:
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)
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Example code for VizCave | stefs | Vizard | 6 | 01-08-2013 12:43 PM |
| Any ideas on linking chess 3ds file with source code? | djones1010 | Vizard | 1 | 04-24-2009 10:56 PM |
| Trying to integrate Source Code with Vizard | djones1010 | Vizard | 1 | 03-10-2009 03:58 PM |
| Vizard Tip of the Month: Use Tasks to Simplify your Code | Gladsomebeast | Vizard | 5 | 05-02-2008 05:30 PM |
| Vizard Crashes: causes are hard to determine, possible problem with the viz code | vr_boyko | Vizard | 1 | 01-07-2005 11:52 AM |