WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-02-2010, 07:19 AM
shahramy shahramy is offline
Member
 
Join Date: Dec 2009
Posts: 41
Unhappy 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?
Reply With Quote
  #2  
Old 01-05-2010, 04:39 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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()
Reply With Quote
  #3  
Old 01-13-2010, 11:58 PM
shahramy shahramy is offline
Member
 
Join Date: Dec 2009
Posts: 41
thankyou. but how can I get this undocumented Vizard plugin?
Reply With Quote
  #4  
Old 01-14-2010, 12:23 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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.
Reply With Quote
  #5  
Old 01-23-2010, 12:30 PM
shahramy shahramy is offline
Member
 
Join Date: Dec 2009
Posts: 41
thanx a lot
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:27 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC