WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-29-2004, 11:44 AM
shai shai is offline
Member
 
Join Date: Oct 2004
Posts: 29
freeze problem

Hello,

a user called 'vduckie' w/ subject 'avatar animations' asked a question on how to freeze an avatar once it finishes an action.

I have the same problem, except my animation is NOT a numbered animation.

I.e my animation is 'movehead=avatar.headto(90,0,0)'

the problem is when i issue the command:
'viz.starttimer(FREEZE_AVATAR,male.getduration(mov ehead))'

the getduration method wants an integer as a parameter.

is there a way to get over this?

tnx
Reply With Quote
  #2  
Old 11-29-2004, 11:58 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

The headto action should already stay frozen when it finishes. Is this not happening in your case? The getduration command will only return the duration of a certain animation number, it will not work on actions.
Reply With Quote
  #3  
Old 11-29-2004, 04:17 PM
shai shai is offline
Member
 
Join Date: Oct 2004
Posts: 29
okay, here's the thing:

I'm currently looping on my own custom made sit idle animation
which basically has the avatar moving slightly while it is sitting (on a chair.)

Now, when I call my avatar.act(headmove) it moves the head to
the right, as it's sitting, but when it finishes it, it aborts my
sit idle animation and what I get is an avatar that is standing
and has its head turned.

so what i want is for vizard to move the avatar's head. but to KEEP sitting...

is there any way to do this?
Reply With Quote
  #4  
Old 11-29-2004, 05:17 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

Which version of Vizard are you using?
Reply With Quote
  #5  
Old 11-29-2004, 05:40 PM
shai shai is offline
Member
 
Join Date: Oct 2004
Posts: 29
i'm using 2.17a
Reply With Quote
  #6  
Old 11-29-2004, 05:50 PM
shai shai is offline
Member
 
Join Date: Oct 2004
Posts: 29
oh, and when i send "looping" my sit idle animation i meant the avatar is in a certain state.

(the sitting i made in 3dsmax, and i'm playing that cal3d animation.)

(it's basically a person with his thighs horizontal in a sitting position and i put that person on a chair)
Reply With Quote
  #7  
Old 11-29-2004, 05:51 PM
shai shai is offline
Member
 
Join Date: Oct 2004
Posts: 29
send=said ... errgh! :-)
Reply With Quote
  #8  
Old 11-29-2004, 05:52 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

To prevent the avatar from changing animations after turning its head, set its idle pose to -1. Here is how to do it for version 2.17a and below:
Code:
avatar.cal.pose(-1)
For version 2.50 and above, the previous code will not work. You will have to do the following:
Code:
avatar.idlepose(-1)
Reply With Quote
  #9  
Old 11-29-2004, 06:26 PM
shai shai is offline
Member
 
Join Date: Oct 2004
Posts: 29
still didn't work :'(

note: when i do avatar.idle(4) it doesn't do it right either. (it makes the avatar stand each time it finishes an animation)

but anyway, this following code still makes the man stand up when finished with the head animation:

any ideas?
(btw, state(4) is my custom sitting animation.)
--------------------------------------------------------------
import viz

viz.go()

avatar=viz.add('objects/Male.cfg')
avatar.state(4)
avatar.cal.pose(-1)

def mykey(key):
if key == 't':
movehead=avatar.headto(90,0,0)
avatar.act(movehead)

viz.callback(viz.KEYBOARD_EVENT, 'mykey')
Reply With Quote
  #10  
Old 11-30-2004, 11:02 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

Try setting the idle pose to 4, so that it will continue using that animation when it finishes the head turning action.
Reply With Quote
  #11  
Old 12-01-2004, 12:53 PM
shai shai is offline
Member
 
Join Date: Oct 2004
Posts: 29
worked like a charm--

tnx man!
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 08:41 PM.


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