WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 09-10-2016, 03:09 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
If both controllers are connected, try the following:

Code:
rightController = steamvr.getControllerList()[0]
leftController = steamvr.getControllerList()[1]

def printData():
	print 'pos right:',rightController.getPosition()
	print 'pos left :',leftController.getPosition()
	
vizact.onupdate(0,printData)
However, I would recommend using vizconnect to connect to the Vive in Vizard. In the preset configuration list there is a 'HTC Vive' option. That connects to all hardware and renders a hand for each controller. The transport allows you to navigate using the controller track pad. You can also get the controller position in your own script:

Code:
rightTracker = vizconnect.getTracker('r_hand_tracker').getRaw()
leftTracker = vizconnect.getTracker('l_hand_tracker').getRaw()

def printData():
	print 'pos right:',rightTracker.getPosition()
	print 'pos left :',leftTracker.getPosition()
	
vizact.onupdate(0,printData)
Reply With Quote
 

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
Oculus Rift Drift teklab Vizard 20 04-01-2016 08:57 AM
How to keep the Orientation of mainview same as the world coordinates in the vizard jacky Vizard 1 05-17-2013 01:01 PM
display the position and euler coords of the main view Josh Vizard 1 03-22-2010 11:48 AM
Dtrack and avatar -coordinates question sircedric4 Vizard 3 09-08-2009 12:32 PM


All times are GMT -7. The time now is 04:48 PM.


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