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
Technology & Software Manager
Anatomics Pty Ltd
Suite 4 Level 1, 568 St Kilda Rd, Melbourne VIC 3004 Australia
Telephone +61 (0) 3 9529 8088
Facsimile +61 (0) 3 9529 8099
Email [EMAIL PROTECTED]
www.anatomics.com

Anatomics Logo

The information transmitted is intended solely for the person or entity to which it is addressed to and may contain confidential and /or privileged materials. If you are not the intended recipient of this message, you are hereby notified that any use, review, retransmissions or dissemination is prohibited. If you received this email in error, please notify the sender and delete the email and attached material. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of the company.

 

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to