[Papervision3D] - Issue camera.unproject & camera.ortho ?
tim.knip at gmail.com
Tue Apr 28 14:48:49 PDT 2009
When a camera is in ortho-mode the camera internally switches to
Camera3D#useProjectionMatrix = true;
In revisions earlier then rev. 907 unproject does not work when
Camera3D#useProjectionMatrix = true;.
Now, if you have a revision of PV3D earlier then r.907, then this
might be your lucky day :-)
Just updated #unproject to work with Camera3D#useProjectionMatrix = true;
So, please update from svn to get latest rev.
NOTE: to make things complicated #unproject works _differently_ with
Camera3D#useProjectionMatrix = true / ortho = true;
You need call #unproject 2 times :
var a : Number3D = cam.unproject( screenX, screenY, 0 ); //
intersection with near plane
var b : Number3D = cam.unproject( screenX, screenY, 1 ); //
intersection with far plane
var ray : Number3D = a.substract( b );
This constructs a ray 'shooting' into the scene.
Let me know if this works for you (cause, o shame: did not test ortho-mode yet).
2009/4/28 o renken <renkster at gmail.com>:
> Hi Visioners, hi team,
> does somebody know if there is a problem with unprojecting mouse-coordinates
> while using camera in ortho-mode?
> While using a normal camera it works without any problems.
> Or is there something iam missing?
> Thanks and a nice day/night
> Papervision3D mailing list
> Papervision3D at osflash.org
More information about the Papervision3D