Hi Morne, I've done something like this, though not exactly the same. One gotcha I found was that getting the matrix from the Trackball was not enough to reset it later. Internally the trackball works with a distance, rotation and center, (thats a scalar, quat and vec3) and all this info is not encoded in the final matrix used for drawing. I added getDRC and setByDRC to the cameras I have.
You can prob find the code for these in the list archives. If you don't, let me know. regards jp ps. are you in South Africa by any chance? Morné Pistorius wrote: > Hi, > > I have a scene with various models loaded. I want to be able to double > click on a model and have the camera move and position itself in front > of the model, and afterwards return to the default trackball manipulator. > > I looked at the osgcamera and osganimation examples and I'm trying to > come up with a way of doing this. These are my thoughts: > > 1. Somehow get the current camera position and attitude from the > trackball manipulator. > 2. Compute an animation path from this point to a point in front of the > model. > 3. Replace the trackball manipulator with an AnimationPathManipulator > and set the animation > 4. Once it is done, replace it with with the original trackball > manipulator and set its home position to the current camera position. > > Does this sound like the right way to go forward? I would appreciate > any feedback on this, pointers or gothcas from people with more > experience than I have. Also, if there are any examples that better fit > what I am trying to do, I would be much obliged. > > Thank you kindly, > Morne > > > ------------------------------------------------------------------------ > > _______________________________________________ > osg-users mailing list > osg-users@openscenegraph.net > http://openscenegraph.net/mailman/listinfo/osg-users > http://www.openscenegraph.org/ -- This message is subject to the CSIR's copyright, terms and conditions and e-mail legal notice. Views expressed herein do not necessarily represent the views of the CSIR. CSIR E-mail Legal Notice http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html CSIR Copyright, Terms and Conditions http://mail.csir.co.za/CSIR_Copyright.html For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR Legal Notice send a blank message with REQUEST LEGAL in the subject line to [EMAIL PROTECTED] This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. _______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/