Joined: 15 May 2014
|Posted: Thu May 15, 2014 5:43 pm Post subject:
Help with OSG
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();
//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()));
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.