Camera3D.screen not working as expected

18 views
Skip to first unread message

Sören Meyer-Eppler

unread,
Jan 11, 2010, 3:16:30 AM1/11/10
to Away3D.dev
I'm beginning to lose my sanity over this. Could someone please take a
look at the attached minimal sample program and tell me what's going on
there?

What I am trying to archive is reproducing the perspective projection
the camera does in order to find the exact 2D bounds of a 3D object.

To test this I have generated a sphere of radius 100 at the origin and a
perspective lens camera at (0,0,-300). I then use Camera3D.screen and
Camera3D.lens.project to project a pair of test coordinates. I have
verified (by tracing the sphere's vertices) that these coordinates are
on the surface of the sphere. However, the screenVertices I get are not
on the 2D sphere silhouette as I would have expected. Am I using the
wrong matrix? The wrong approach?

Global stage scaling is off. I'm using the latest subversion revision of
Away3D (not lite).

best regards,

Sᅵren

TestProjection.as
Reply all
Reply to author
Forward
0 new messages