WorldViz User Forum

WorldViz User Forum (
-   Vizard (
-   -   to rephrase my question... (

shai 10-26-2004 11:52 PM

to rephrase my question...
I'm sorry, if the first question seemed a bit ambiguous--

I'm trying to connect a few animations.

my first animation is a person that is sitting down,
the second animation is a person that is waving while sitting down, etc.

i'm trying to do this with the act method but it doesn't flow smoothly between the two animations. also, i need to make these animations in seperate files (that way I can control how many times I want to loop an animation in the middle.)

does anyone have a suggestion?


farshizzo 10-27-2004 10:08 AM


Sorry for the late reply. I was trying to get this working myself but I still get some flicker in between animations. I'll try to fix this in the next version so that animations can blend smoothly between one another. In the meantime you might have to do this manually.

The act method simply queues an action which calls the execute command of an avatar. The execute command simply executes the animation cycle once. I've included a sample script which shows how to do this manually. Let me know if you have trouble getting it to work. (Note, you must press the spacebar to start the animation sequence)

import viz

#Declare a timer constant

#Add the avatar
male = viz.add('male.cfg')

#Create list of actions to be executed
actions = [2,2,3]

def onkeydown(key):
        if key == ' ':
                #Start timer to execute actions


def ontimer(num):
        if num == NEXT_ACTION:
                if len(actions) > 0:
                        #Remove first animation from list
                        animation = actions.pop(0)
                        #Get the duration of the animation
                        duration = male.getduration(animation)
                        #Execute the animation (with 0.1 in/out delays)
                        #Start a timer that will expire before next animation is finished
                        viz.starttimer(NEXT_ACTION,duration - 0.1)
                        print 'No more actions'


shai 10-27-2004 10:55 AM

animation sequence
This is exactly what I was looking for--

thanks so much!

All times are GMT -7. The time now is 08:36 AM.

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