[osg-users] LineSegmentIntersector doesn't give accurate Coordinates

Robert Osfield robert.osfield at gmail.com
Thu Jun 21 03:58:41 PDT 2018


Hi Jochen,

There is too many unknowns about what you are doing for us to be provide
any specific advice as to what is going wrong.

It could be that your are passing in the mouse coords incorrectly.  It
could be that you are interpreting the intersections coordinates
incorrectly.  It could be that you are inserting your visual markers
incorrectly.  It could be some other random thing that you are doing wrong.

As when doing know anything specific about your code there is nothing we
can do to help at this point.  You best next step would be to post some of
the code you are using to set up the intersection, to place your visual
markers and a screen shot of what is happening.

Cheers,
Robert.

On Thu, 21 Jun 2018 at 11:44, Jochen Schwitzer <
fasoldma63759 at th-nuernberg.de> wrote:

> Hi,
>
> I am trying to get the local coordinates of my mouse in a 2D scene, when
> the mouse is clicked.
>
> I draw a transparent terrain and use the LineSegmentIntersector with the
> Mouse Coordinates to get the LocalIntersectionPoint and draw this point
> then.
>
> However, when I click, the point is always at some place else. Always
> relative to the mouse position but the distance varies when I zoom in or
> out.
>
> Can anybody help me? What am I missing?
>
> Thank you!
>
> Cheers,
> Jochen
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=74098#74098
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180621/606572fc/attachment.html>


More information about the osg-users mailing list