Thread: size of avatar
View Single Post
  #2  
Old 02-18-2010, 11:27 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You can get the bounding box of an object and look at its dimensions.
Code:
import viz
viz.go()

ground = viz.add('tut_ground.wrl')

male = viz.add('male.cfg')

box = male.getBoundingBox()
print box.size

#show bounding box on avatar
male.add('box.wrl',alpha=.2,pos=[0,box.height/2,0.05],scale=box.size)  

#Setup camera navigation
import vizcam
vizcam.PivotNavigate(center=[0,1,0],distance=5)
Reply With Quote