WorldViz User Forum

WorldViz User Forum (
-   Vizard (
-   -   Avatar always returns in initial position (

pattie 08-28-2006 04:56 PM

Avatar always returns in initial position
I have a problem I cannot figure out.
After I run a sequence on the male avatar provided by Worldviz, the avatar always returns in its initial posing position (standing with spreaded arms). For example, the sequence consists of walking to a position, then sitting. I would like the avatar to stay in the sitting position after the sequence has ended, but it will always return in its initial position.
I probably forgot something stupid :-)
Thanks for your help


betancourtb82 08-29-2006 12:00 PM

Here's something that might help. I had the same problem and was given this solution by someone in this forum.


def finishedActions(avatar):
 global avatarCount
 if isinstance(avatar,viz.VizAvatar):
  WaitThenFreeze = vizact.sequence( vizact.waittime(avatar.getduration(10)-.85), vizact.speed_node(0) )
  avatar.add(WaitThenFreeze) #Add the action to the avatar

pattie 08-31-2006 08:15 PM

Avatar always return in initial position
Thanks for your info. It actually helped me find a shorter and simpler solution.

Here it is:

avatar = viz.add('male.cfg')
mainview = viz.MainView
viewPosition = mainview.getPosition()
walk = vizact.walkto(viewPosition[0],viewPosition[1]-1,viewPosition[2]+6)
## This is the interesting code here

I hope it can be useful


All times are GMT -7. The time now is 05:38 AM.

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