// set up the camera manipulators. { osg::ref_ptr<osgGA::KeySwitchMatrixManipulator> keyswitchManipulator = new osgGA::KeySwitchMatrixManipulator; osgGA::TrackballManipulator *trackBallManipulator= new osgGA::TrackballManipulator(); trackBallManipulator->setAllowThrow(false); keyswitchManipulator->addMatrixManipulator( '1', "Trackball", trackBallManipulator );