Hi,
When I use any of the following methods to reposition osgText::Text the picking
fails when used with LineSegmentIntersector.
Code:
text->setPosition() // anything other than {0.0,0.0,0.0}
text->setRotation() // anything other than osg::Quat(0.0, osg::Z_AXIS)
text->setAlignment() // anything other than LEFT_BOTTOM
As far as I can work out from debugging, the bounds are being correctly
calculated and "intersectAndClip" is returning true. The problem seems to be
when "drawable->accept" is called in the "intersect" method, the
IntersectFunctor does not have the transformations that Text is using and the
vertices passed to it are not transformed.
The only way I can find around this is to place the text inside
PositionAttitudeTransform's and do the positioning myself. Unfortunately,
since I do not know the eventual dimensions of the text, doing a CENTER_CENTER
alignment is practically impossible.
If I leave the alignment to be done by Text then a CENTER_CENTER alignment
means that you can only pick the top left quarter of the text.
I have tried placing the text inside either a Geode or a Group but it makes no
difference.
I would be very happy if I was simply not calling something I should be to
initalise the Text or its container correctly.
We are using OSG 3.5.6 statically linked via VCPKG.
Any help gratefully received,
Thanks,
Brian[/code]
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=73137#73137
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org