View Single Post
  #7  
Old 04-20-2017, 01:26 PM
haohaoxuexi1 haohaoxuexi1 is offline
Member
 
Join Date: Sep 2015
Posts: 81
Quote:
Originally Posted by Jeff View Post
Does the following work?

Code:
for i in range(0, 24):
	t = vrpn.addTracker( 'Tracker0@localhost',i )
	s = vizshape.addSphere(radius=.1)
	s.setReferenceFrame(viz.RF_VIEW)
	l = viz.link(t,s)
	#change z value to move sphere closer/farther from view
	l.postTrans([0,0,2]) 
	trackers.append(t)
	links.append(l)
	shapes.append(s)
The skeletal appears in front of the mainview but I wish to obtain the position of the skeletal joints in global coordinate.

When I apply "pos_s = s.getPosition() print pos_s" to the code, it seems the position is still their local position, is there a method using coordinate transformation to achieve keeping skeletal appearing in front of the mainview.

waiting for the reply
Reply With Quote