Hello Petr,

4) Update position line

[...]

5) Check intersect if ( intersectorGroup->containsIntersections() )
{
 ...
intersection.getWorldIntersectPoint(); //interscetion point is still the same(!) 33.0f, - 23.0f, 0.0f //i thought that correct point must be 33.0f, 23.0f, 0.0f because LineSegmentIntersector contains correct new (start - end) position ...
}

Does your step 5 retest for intersections (i.e. re-run the intersection visitor)? Also, to be safe, I would call reset() on the intersector and intersection visitor between intersection tests.

I have done this before (re-used the same intersector and intersection visitor for many intersection tests) so it should work, though I've never used intersection groups so perhaps there's a bug there.

If you can't get it to work I suggest you modify an existing OSG example (say osgpick) to demonstrate your problem and send it here, if we try it we can hopefully see what's wrong (either in your code or in OSG).

Hope this helps,

J-S
--
______________________________________________________
Jean-Sebastien Guay    [email protected]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to