WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-10-2010, 01:36 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Can you post an example that shows whats happening?

You can check the current action of a specific pool on a node is using <node3d>.getAction().
Reply With Quote
  #2  
Old 08-12-2010, 02:43 AM
Philippe Philippe is offline
Member
 
Join Date: Jul 2010
Posts: 12
I am using Vizard only for two weeks, so maybe some of my questions are trivial ones. The problem we get was as follows (meanwhile, I found a workaround, but I would like to understand why it happened so that I will use the lookat in a proper way in the future):

The code we had was:

def lookAtObjectAction(obj,avatar):
v = obj.getPosition()
head = avatar.getBone('Bip01 Head')
a1 = vizact.call(head.lock)
a2 = vizact.call(head.lookat, v, 0 , viz.AVATAR_WORLD )
return vizact.sequence(a1,a2)



def bringAvatarIn(avatar) :
avatar.visible(viz.ON)

morphs = avatar.getMorphList()
talkMorph = morphs[2]
speak = vizact.parallel(vizact.speak(talkFile,scale = 0.003,morph = talkMorph),vizact.animation(3))
lookRight = lookAtObjectAction(my_cofeeMug,avatar)
waltkTo1 = vizact.walkTo([-1.2,0,2.0],WALKING_SPEED_1,0)
waltkTo2 = vizact.walkTo([0, 0, 3],WALKING_SPEED_2,180)
lookStraight = lookAtObjectAction(viz.MainView,avatar)
[exp_position_x,exp_position_z,exp_position_y] = viz.MainView.getPosition()
waltkTo3 = vizact.walkTo([-1,0,4],WALKING_SPEED_2,180) seq = vizact.sequence(lookRight,waltkTo1,lookStraight,wa ltkTo2,lookStraight, waltkTo3,lookStraight)
avatar.addAction(seq)

I do not understand why using lookStraight changes the orientation of the head (the Avatar is looking backwards, to his left), although the MainView stays at the same point all the time - only at the third time we call lookStraight in the seq, the Avatar looks straight and not backwards. Is it because of the "head.lock" ? If so, why does the head turn forwards at the third time we call lookStraight ?
__________________
Thanks,

Philippe
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 03:57 PM.


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