Hello, I'm am finishing an assignment with OSG and I need help with a few bits. 
I have finished all the hard stuff it's just the optional stuff that I need to 
do now and any help or support would be much appreciated.

This is the code I have used to implement a Trackball Dragger into my program:

        osgManipulator::TrackballDragger *pDragger=new 
osgManipulator::TrackballDragger();
        pDragger->addTransformUpdating(pMatrixTransform);
        pDragger->setInitialBound(pSwitch->computeBound());
        ((osg::Group*)pMatrixTransform->getParent(0))->addChild(pDragger);
        pDragger->setupDefaultGeometry();
        //float scale = pDragger->getBound().radius() * 1.6;
    //pDragger->setMatrix(osg::Matrix::scale(scale, scale, 
scale)*osg::Matrix::translate(pDragger->getBound().center(), 
pDragger->getBound().center(), pDragger->getBound().center()));
        pDragger->setHandleEvents(true);
        pDragger->setActivationModKeyMask(osgGA::GUIEventAdapter::MODKEY_CTRL);

I have implemented a Trackball Dragger to interact with a robot I have created 
but want to know how I can select the robot I have made using the mouse. If 
this is overly complicated, don't worry about it.
Also, how do I make it so that the trackball dragger geometry is only visible 
when holding the CTRL key?

Again any help would be very much appreciated.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=59446#59446





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to