Biom
05-29-2013, 06:10 AM
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?
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)
Any help is welcome
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?
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)
Any help is welcome