|
本帖最后由 1162810317 于 2013-4-2 15:48 编辑
想用KeySwitchMatrixManipulator切换漫游器,但不知道为什么没用,1,当我启动路径漫游后按“l” 键没反应。2,以前一直有用的手动漫游器加入到KeySwitchMatrixManipulator后鼠标事件正常,但键盘的前后左右漫游出错!。请大神指教!
osg::ref_ptr <TravelManipulator> travel = new TravelManipulator() ;
// Create a Manipulator Switcher
keyswitchManipulator = new osgGA::KeySwitchMatrixManipulator;
// Add our trackball manipulator to the switcher
keyswitchManipulator->addMatrixManipulator( 'l', "TravelManipulator", travel.get ());
// Init the switcher to the first manipulator (in this case the only manipulator)
keyswitchManipulator->selectMatrixManipulator(0); // Zero based index Value
,,,,,,,,,,,
mViewer->setCameraManipulator(keyswit chManipulator.get());
本来要上传错误截图的,但因为内部服务器一直错误,无法上传图片,只能先这样了。
谢谢! |
|