#1
|
|||
|
|||
minicooper
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?
|
#2
|
|||
|
|||
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.
Code:
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() |
#3
|
|||
|
|||
thankyou. but how can I get this undocumented Vizard plugin?
|
#4
|
|||
|
|||
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.
|
#5
|
|||
|
|||
thanx a lot
|
|
|