View Full Version : minicooper
shahramy
01-02-2010, 07:19 AM
hi every body. i have used mini cooper in my project and move it. but i can`t spin the wheels. please help me how can i do it?
You can do this but you'll need to use an undocumented Vizard plugin called SceneGraphTools.dle. Here is an example that spins the right front wheel.
import viz
osg = viz.add('SceneGraphTools.dle')
ground = viz.add('tut_ground.wrl')
car = viz.add('mini.osg', pos = [0,0,7], euler = [90,0,0])
# Get raw handle to 'rfr' group node
rfr = osg.getRootNode(car).findChildren('rfr')[0]
# Get handle to children
children = rfr.getChildren()
# Create new raw group node to hold children
tireGroup = osg.addGroup('RightFrontTire')
tireGroup.setChildren(children)
# Insert tire group underneath rfr node
rfr.setChildren([tireGroup])
# Get handle to new group node
tire = car.getChild('RightFrontTire')
spin = vizact.spin(1,0,0,90)
tire.addAction(spin)
viz.go()
shahramy
01-13-2010, 11:58 PM
thankyou. but how can I get this undocumented Vizard plugin?
The plug-in is included with the Vizard install. Just make sure your version of Vizard is up to date and you should be able to run that script. You can check that by going to Help --> Check for Updates.
shahramy
01-23-2010, 12:30 PM
thanx a lot
vBulletin® v3.8.7, Copyright ©2000-2024, vBulletin Solutions, Inc.