WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Accuracy of the screentoworld function (https://forum.worldviz.com/showthread.php?t=1939)

omidbrb 03-31-2009 05:31 AM

Accuracy of the screentoworld function
 
Hi,

I'm using the screentoworld and mousepos functions:

Code:

line = viz.screentoworld(viz.mousepos())
but for every mouse position, the starting point of the line generated by screentoworld is the same:

mousepos: [0.62077593803405762, 0.43906509876251221]
begin: [0,2,0]
end: [-34953,-2241,37070]

mousepos: [0.30663329362869263, 0.65108513832092285]
begin: [0,2,0]
end: [-44186,5483,24870]

Could you please correct me if I'm using it incorrectly ? Could it be because the screentoworld function is generating integers rather than real numbers?

Best,
Omid

omidbrb 03-31-2009 07:09 AM

Sorry, that was my mistake. It works correctly.


All times are GMT -7. The time now is 12:41 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC