#1
|
|||
|
|||
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 |
#2
|
|||
|
|||
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. |
#3
|
|||
|
|||
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? |
#4
|
|||
|
|||
Hi,
Which version of Vizard are you using? |
#5
|
|||
|
|||
i'm using 2.17a
|
#6
|
|||
|
|||
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) |
#7
|
|||
|
|||
send=said ... errgh! :-)
|
#8
|
|||
|
|||
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) Code:
avatar.idlepose(-1) |
#9
|
|||
|
|||
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') |
#10
|
|||
|
|||
Hi,
Try setting the idle pose to 4, so that it will continue using that animation when it finishes the head turning action. |
#11
|
|||
|
|||
worked like a charm--
tnx man! |
Thread Tools | |
Display Modes | Rate This Thread |
|
|