Hi Federic, Try setting the center of the trackball by assigning via TrackballManipulator::setNode(nodeyouWantToBeYouCenterOfRotation)
Robert. On 12/21/06, Frédéric SPEISSER <[EMAIL PROTECTED]> wrote:
Hello all, I'm actually working (trying to work...) with /osgGa::TrackballManipulator/ in order to manipulate a camera around a loaded object. I use a perspective projection matrix and a modelview matrix, but when I try to rotate my camera, it seems to rotate around the center of the scene and not around the object... I set my modelview matrix through the method /setByMatrix/ from the /osgGA::TrackballManipulator/ class, this seems to alter the initialisation of the trackball : when i don't set a modelview matrix, the trackball rotation behaves in a normal way. How can I set a modelview matrix to the trackball in a "proper way" that's to say : have a defined view of my object at the start of the rendering and be able to use a trackball on it ? Do I have to use the osgGA::MatrixManipulator::setHomePosition method ? If yes, how ? (I've already tested it..) I ask this question a few days ago, but i keep not understanding how to solve this problem. Could someone help me or give me a clue please ? Thank you, Frédéric _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
