Hi all,
after reading the osgpick example picking seemed to be really easy.
Unfortunately in my application it doesn't work as expected.
I exactly coppied the example code.
osgUtil::LineSegmentIntersector::Intersections intersections;
if (view->computeIntersections(_x, _y, intersections)) {
osgUtil::LineSegmentIntersector::Intersections::iterator hitr =
intersections.begin();
for(; hitr != intersections.end(); ++hitr) {
if (!hitr->nodePath.empty() &&
!(hitr->nodePath.back()>getName().empty())) {
..... do something here
Some times the detected node is correct,
sometimes nothing is detected
and sometimes objects on a completely different place are listed
Any hints what I'm doing wrong? Actually there is not much that can be wrong
...
Thanks for any help
Werner
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org