![]() |
|
#1
|
|||
|
|||
|
Steering wheel mini
In a previous post I read about the possibilty to control the wheels of the mini.osg
Is it possible to control the steering wheel as well I've tryed this, but the steering wheel turns around some orientation of the car. How can change this? Code:
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
steering = osg.getRootNode(car).findChildren('steeringwheel')[0]
# Get handle to children
children = steering.getChildren()
# Create new raw group node to hold children
steerGroup = osg.addGroup('SteeringWheel')
steerGroup.setChildren(children)
# Insert tire group underneath rfr node
steering.setChildren([steerGroup])
# Get handle to new group node
wheel = car.getChild('SteeringWheel')
spin = vizact.spin(0,1,0,90)
wheel.addAction(spin)
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Changing Force-feedback on Wheel | Cage | Vizard | 3 | 10-23-2010 09:37 AM |
| How to create mini car driving by wiimote | superantTTY | Vizard | 7 | 05-18-2010 06:18 AM |
| G25 steering wheel range ! | moneim230 | Vizard | 2 | 03-28-2010 04:54 PM |
| Mac Mini Sound Server ? | djdesmangles | Vizard | 3 | 05-14-2009 01:44 PM |
| Do you have some idea about the bicycle and wheel | sled | Vizard | 6 | 08-01-2003 11:03 PM |