Thread: Kinect
View Single Post
  #4  
Old 08-14-2014, 11:55 AM
roobert roobert is offline
Member
 
Join Date: May 2014
Location: Pachuca, Hidalgo, México
Posts: 34
Send a message via Skype™ to roobert
I could make and models to follow me.
Is there a best way?
Quote:
import viz
import vizshape
import vizact

viz.go()
grid = vizshape.addGrid()

vrpn = viz.addExtension('vrpn7.dle')
hl = vrpn.addTracker( 'Tracker0@localhost',8)
hr= vrpn.addTracker( 'Tracker0@localhost',14)

handLeft=viz.add('hand_left.cfg')
handRight=viz.add('hand.cfg')

def followMe():
pl=hl.getPosition()
el=hl.getEuler()
handLeft.setPosition(pl)
handLeft.setEuler(el)

pr=hr.getPosition()
er=hr.getEuler()
handRight.setPosition(pr)
handRight.setEuler(er)

vizact.ontimer(0.01,followMe)
Reply With Quote