WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 06-17-2013, 11:53 PM
Biom Biom is offline
Member
 
Join Date: May 2013
Posts: 2
The steering wheel turns around the origin of the car.
Instead of turning around its own axis, it turns around the aixs of the car.
But if you look at the following script, the wheels turn around there own axis.
I would like the same kind of rotation but then for the steering wheel of the mini.

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()

Last edited by Biom; 06-17-2013 at 11:56 PM.
Reply With Quote
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing Force-feedback on Wheel Cage Vizard 3 10-23-2010 08:37 AM
How to create mini car driving by wiimote superantTTY Vizard 7 05-18-2010 05:18 AM
G25 steering wheel range ! moneim230 Vizard 2 03-28-2010 03:54 PM
Mac Mini Sound Server ? djdesmangles Vizard 3 05-14-2009 12:44 PM
Do you have some idea about the bicycle and wheel sled Vizard 6 08-01-2003 10:03 PM


All times are GMT -7. The time now is 07:21 PM.


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