Joe Strout wrote:
> On Jan 31, 2008, at 1:26 PM, Bryan Lund wrote:
>> 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.
Sorry, I should have been more clear.
If I move the camera and get the new results from the screenToWorld
function, even in cases where I would expect the x/y to be the same, it
is not.
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?
-Bryan
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|