Hi Sonya, I think you could solve your problem if you understand theory what goes during the whole process and test if anything works from simplest examples, then after tests you'll uncover a problem
for theory I think following to links are useful, but see not only first link, but also second http://www.mvps.org/directx/articles/rayproj.htm http://www.mvps.org/directx/articles/improved_ray_picking.htm Regards Sergey On Sat, Jul 26, 2014 at 1:53 AM, Sonya Blade <sonyablade2...@hotmail.com> wrote: > Dear All, > > I'm having a hard time getting the correct results for the mouse position > in world coordinates. > The problem is: retrived world mouse position is not even close to those > when I hoover over an > object so I couldn't find any correlation between to which vertex of > object is mouse close to. > > To obtain the world mouse position I use world_mouse = > screen_mouse*inverse(MVPW), for obtaining > the vertex position I use LineSegmentIntersector >> > getWorldIntersectionPoint() and there is absolutey > not any coherent value that I can find any relation. My aim was to snap > the mouse to the closest vertex > in object, but produced results are as follow. > > world coords vertex(6.97538 20.55 18.7482" > local coords vertex(0.876922 -3.74963 4" > Mouse Position -101.794 44.6545 -130.128" > > Your help will be appreciated, > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org