|
Hi
all, I’m
trying to implement a simple camera pan, based on the PickHandler found in
osgkeyboardmouse. Everything works fine until the user moves the mouse rapidly
enough to slip-off the edge of the object, causing the next pick to hit either
another object of the far plane. Either way, this means the current pick point
is not usable for a delta with the previous point. Now,
in OpenGL I’ve circumvented this before by storing the depth of the first
hit and reusing that in the projection calculations with the window
coordinates. But in OSG I can’t seem to work out how to achieve the same
result. I
can get the near and far plane values from the cull visitor, but I can’t work
out how to find the normalized position of the pick point. My scene is setup to
look down the Y axis with Z up, so I think the depth value is actually the y
coordinate of the pick point … Someone
must have done this before, but I haven’t come up with much searching the
wiki/archive. Can someone offer some advice? Cheers, Gian Gian Lorenzetto
|
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/

