View Single Post
  #2  
Old 11-14-2013, 05:55 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You can set the sphere to be the parent of the text:
Code:
import viz
import vizshape
import vizact
viz.go()

sphere = vizshape.addSphere(radius=0.2)
text = viz.addText('Sphere',parent=sphere)
text.setPosition([-0.3,0.3,0])
text.setScale([0.2]*3)
text.visible(viz.OFF)

vizact.onkeydown('t',text.visible,viz.TOGGLE)

import vizcam
cam = vizcam.PivotNavigate(distance=3)
cam.centerNode(text)
Reply With Quote