View Full Version : size of avatar
Veronika
02-14-2010, 11:15 PM
Hello,
how find I size of avatar, which I loaded using the command:
avatar=viz.add('male.cfg')
I mind its size, height, etc.
Thanks
You can get the bounding box of an object and look at its dimensions.
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)
johnallen
07-30-2014, 04:12 AM
Thanks, that was helpful.
Can this be found using Inspector at all? That would be the perfect place for it.
Yes, if you click on an object in Inspector it will display the bounding box. You can see the bounding box dimensions in the status bar at the bottom of the window.
vBulletin® v3.8.7, Copyright ©2000-2024, vBulletin Solutions, Inc.