Hi Sujan, what are you trying to do with your 'pan'? To move an object, or to move the camera (view) ?
Nick On Thu, May 9, 2013 at 1:03 PM, Sujan Dasmahapatra < sujan.dasmahapa...@gmail.com> wrote: > I am trying to pan my model pls check the code snippet below. > viewer = composite view. > getTransform() will return a osg::PositionAttitudeTransform list. > > But my object is moving in z direction as well inwards outwards. What am I > doing wrong please help. Thanks Sujan > void CSGraphicsView::pan( float dx, float dy ) > { > osg::Vec3 transform = > viewer->getTransform()->getTrans().first()->getPosition(); > transform += osg::Vec3(dx,dy,0.0f); > viewer->getTransform()->getTrans().first()->setPosition(transform); > } > > -- > Thanks & Regards > Sujan > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > -- trajce nikolov nick
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org