On Jan 31, 2008, at 1:26 PM, Bryan Lund wrote:
> I pulled the example code below from the faq (I assume that kDegrees =
> 0.0174532925).
Check the sample projects that come with the text.
[Re. the ScreenToWorld function...]
> But it seems to not return consistent results at different camera
> positions. If I return the x/y of the returned vector of a known
> location of an existing 3d object, then modify the camera.position.x
> (say, to slide it to the right a bit while still keeping the object
> visible), the next time I return the x/y of the vector of that same
> known location... it's now a different value.
Well, of course it is. The point of this function is to give you a
world position that corresponds to some screen position. If you move
the camera, then of course the world position for a screen position
changes too.
I'm not sure what "of the returned vector of a known location of an
existing 3d object" means, but I'm sure that your overall description
-- that when you move the camera, the result from this function
changes -- makes perfect sense.
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>
|