On Jan 31, 2008, at 2:07 PM, Bryan Lund wrote:
> If I add an object. And do not move that object. Then shouldn't the
> result of the ScreenToWorld function (when I mouse over that object in
> order to pass in the x/y parameters) return the same x/y/z no matter
> what the x/y of the camera.position is?
No. Consider that for any position on the screen, there are an
infinite number of positions in 3D space that map to it -- more
specifically, all the points along a line between the camera and that
point in the screen.
The ScreenToWorld function arbitrarily picks one of these (in a plane
close to the near clipping plane). So the position it returns should
be in the same line as some 3D object you're mousing over, but won't
generally be the very same point.
But of course, if your purpose is to determine what object (or
position on an object) you're mousing over, then you should be using
Rb3DSpace.FindObject or .FindPoint anyway.
Best,
- Joe
--
Joe Strout
Inspiring Applications, Inc.
http://www.InspiringApps.com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|