WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-05-2011, 06:06 AM
Veronika Veronika is offline
Member
 
Join Date: Jan 2010
Posts: 22
I have this code:
Quote:
import viz

viz.go()

#set main view (x,z,y)
viz.MainView.translate(0,2,-15)
viz.clearcolor(viz.GRAY)

#Connect to Patriot sensor
polhemus = viz.add('polhemus.dle')
patriot = polhemus.addPatriot()


avatar=viz.add('male.cfg')

#Link the hand to the Patriot data
viz.link(patriot,avatar)

def updateavatar():
pos=patriot.getPosition()
ori=patriot.getEuler()
avatar.setPosition([pos[0],0,pos[0]])
avatar.setEuler([ori[0],0,0])

vizact.onupdate(0,updateavatar)
and I want to walk with avatar and if sensor is further from calibration place, the speed of walking is more. But this code for update avatar isn't function. I whole day try to set this, but I don't know how. Can you help me with this?
Reply With Quote
  #2  
Old 10-05-2011, 11:59 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Try removing the line where the avatar is linked to the Patriot data. That link is overriding the update function.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Avatar walking + camera free look kovitch Vizard 2 08-08-2011 07:57 AM
avatar walking over a sequence of points IGoudt Vizard 1 10-16-2009 11:22 AM
avatar automatically runs animation after fading into view v-clizzin Vizard 1 10-14-2009 05:01 PM
Looking through the eyes of an avatar Frank Verberne Vizard 2 04-01-2008 05:52 AM
How to make avatar's eyes to blink when speaking michelcm3 Vizard 12 01-15-2008 08:48 AM


All times are GMT -7. The time now is 06:16 AM.


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