Hi,
Have you checked the return value of the getTextureLookUp call? Documentation states that it will return a nullptr if no texture is available.Hi, using the example, osgparticleeffects.cpp, I added the following lines of code to the pick function (inside the //MGREENE section): Code: void pick(osgViewer::Viewer* viewer, const osgGA::GUIEventAdapter& ea) { osg::Group* root = dynamic_cast<osg::Group*>(viewer->getSceneData()); if (!root) return;osgUtil::LineSegmentIntersector::Intersections intersections;if (viewer->computeIntersections(ea,intersections)) { const osgUtil::LineSegmentIntersector::Intersection& hit = *intersections.begin(); //MGREENE std::cout << "hit = " << hit.getWorldIntersectPoint().x() << "," << hit.getWorldIntersectPoint().y() << "," << hit.getWorldIntersectPoint().z() << std::endl; osg::Vec3 tc(0,0,0); osg::ref_ptr<osg::Texture> myTexture = hit.getTextureLookUp(tc); std::cout << "tc = " << tc.x() << "," << tc.y() << "," << tc.z()<< std::endl; //END MGREENE bool handleMovingModels = false; ... but the values of tc are always 0,0,0.
If this doesn't help, debugging into the function might help ;-) Cheers Sebastian
Thank you! Cheers, Mike[/code] ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=64894#64894 _______________________________________________ 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

