WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-28-2006, 04:56 PM
pattie pattie is offline
Member
 
Join Date: Aug 2006
Posts: 32
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

Patrick
Reply With Quote
  #2  
Old 08-29-2006, 12:00 PM
betancourtb82 betancourtb82 is offline
Member
 
Join Date: Jan 2006
Posts: 103
Here's something that might help. I had the same problem and was given this solution by someone in this forum.

Code:
def finishedActions(avatar):
 global avatarCount
 if isinstance(avatar,viz.VizAvatar):
  WaitThenFreeze = vizact.sequence( vizact.waittime(avatar.getduration(10)-.85), vizact.speed_node(0) )
  avatar.execute(10)
  avatar.clear(viz.ALL)
  avatar.clear(viz.CURRENT_ACTION)
  avatar.add(WaitThenFreeze) #Add the action to the avatar
Reply With Quote
  #3  
Old 08-31-2006, 08:15 PM
pattie pattie is offline
Member
 
Join Date: Aug 2006
Posts: 32
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')
avatar.translate(0,1,4)
mainview = viz.MainView
viewPosition = mainview.getPosition()
walk = vizact.walkto(viewPosition[0],viewPosition[1]-1,viewPosition[2]+6)
avatar.add(walk)
## This is the interesting code here
avatar.execute(10,delay_in=avatar.getduration(10)-.85,freeze=1)

I hope it can be useful

Patrick
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:39 AM.


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