View Single Post
Old 06-11-2018, 10:40 AM
Vaquero Vaquero is offline
Join Date: Nov 2015
Posts: 62
Smile figured it out

I went at it again today and figured it out. For now, I added a few lines of code to the file that vizconnect saves. In the initTrackers() function, add these lines of code, if you want to track the extra HTC Vive trackers that are not controllers in vizconnect:

	#VC: initialize a new tracker
	_name = 'extra_tracker_1'
	if vizconnect.isPendingInit('tracker', _name, initFlag, initList):
		#VC: init the raw object
		if initFlag&vizconnect.INIT_RAW:
			#VC: set some parameters
			index = 0

			#VC: create the raw object
			import steamvr
				tracker = steamvr.getTrackerList()[index]
			except IndexError:
				viz.logWarn("** WARNING: Not able to connect to tracker at index {0}. It's likely that not enough trackers are connected.".format(index))
				tracker = viz.addGroup()
				tracker.invalidTracker = True
			rawTracker[_name] = tracker

		#VC: init the wrapper (DO NOT EDIT)
		if initFlag&vizconnect.INIT_WRAPPERS:
			vizconnect.addTracker(rawTracker[_name], _name, make='Valve', model='SteamVR Controller Tracker')
You can, of course, change the name. Add this snippet again with another name and index to add additional trackers.
Reply With Quote