Hi Elliot, I'm afraid I don't have time to go debug your application, I can try and point you in the right direction, what you are doing is pretty straight-forward and not something I would expect particular problems with.
Transforming the LineSgment for the wand coordinates to the world coordinates by muliplying by the inverse of the wand matrix should work. Try using debugging output of the results such as outputing to the console the transformed vertices, also try inserting a osg::Geometry with a line segment into the root of the scene graph using the transformed coordinates. Robert. On Sat, Nov 13, 2010 at 7:33 PM, Elliott Dicus <[email protected]> wrote: > Hello Robert, > > This is the code I was using. However, when I invert the matrix I don't seem > to get any intersections. When I comment it out I get some results, but I > have other questions there. :) > > > Code: > //Start and End Points > osg::Vec3d start = osg::Vec3d(0,0,30); > osg::Vec3d end = osg::Vec3d(0,0,90); > > //Transform by penTrans > osg::Matrixd tempMatrix = penTrans->getMatrix(); > //tempMatrix.invert(tempMatrix); > start = start * tempMatrix; > end = end * tempMatrix; > > > > Then I'm using getLocalIntersectPoint() on the first intersection (If I have > any). Is "Local" in the coordinate system of the object that was intersected? > If that's the case then I'd expect "World" to be in the coordinate system of > the node the visitor starts in. Is this correct? > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=33734#33734 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

