WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 02-24-2013, 10:52 PM
atalantis atalantis is offline
Join Date: Feb 2013
Posts: 1
Problems Ending Animation


So I'm running code so that an avatar runs a series of random animations one after another until the user signals the animations to stop with a key press. The problem comes up after the user has signaled the animations to stop. It stops the current animation, and then starts up a new one. This is even after I have told it to clearActions(). Perhaps I don't have a good grasp on how the action list works with the viz.FOREVER parameter.

teacher = viz.addAvatar('avatars/teacher/teacher1/teacher.cfg')

def Start_Gestures():
	random_gesture = vizact.animation(vizact.randint(1,5), 3.0)
	teacher.runAction(vizact.sequence(random_gesture, viz.FOREVER))
def End_Gestures():

vizact.onkeydown('s', Start_Gestures)
vizact.onkeydown('e', End_Gestures)
Any thoughts?

Thanks in advance!
Reply With Quote
Old 03-01-2013, 08:41 AM
tokola tokola is offline
Join Date: Nov 2012
Posts: 67

as far as I know you cannot control avatar animations with the action library commands. Look for commands related to avatar animations. Examples are: <node3d:avatar>.setAnimationState, <node3d:avatar>.setAnimationSpeed, <node3d:avatar>.stopAnimation, etc.

I hope this helps!
Reply With Quote
Old 03-01-2013, 11:49 AM
farshizzo farshizzo is offline
WorldViz Team Member
Join Date: Mar 2003
Posts: 2,849
The default idle animation for the avatar is 1. It looks like you want animation 7 to be the idle animation. Use the following to change the idle animation:
The avatar will automatically start this animation when the action action is completed. You can also disable the automatic idle animation by setting it to -1. This allows you to fully control which animation the avatar enters.
Reply With Quote

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Clarification on CAL3D Avatar Animation in Vizard shivanangel Vizard 2 11-22-2010 07:16 AM
Problems with interaction of vizact.turn and animation path Enlil Vizard 3 11-24-2008 04:23 PM
Animation Tracks.... k_iwan Vizard 2 03-26-2007 05:52 PM
Jumpy animation Elizabeth S Vizard 1 11-08-2006 02:11 PM
avatar animation problems jrodman Vizard 1 01-18-2006 09:12 AM

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

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