Hello!
As is clear from the problem I’ve outlined below, I’m fairly new to Away3D but have spent several days digging in and learning and trying things.
I’m trying to get a 3D space position translated to a 2D position in screen coordinates.
I found the View3d.project function and figured that was the way to go.
However, I’ve found the resulting screen coordinate to be off UNLESS my View3D is square.
So this gives an accurate screen x/y:
view = new View3D();
view.camera.lens = new PerspectiveLens(55);
view.width = 800;
view.height = 800;
Vector3D screenPos = view.project( TARGET_VEC3D_LOCATION );
But this doesn’t:
view.width = 1200;
view.height = 800;
The x coordinate is off. Clearly related to the View’s non-square aspect ratio.
Researching the forum (and web) I’ve found lots of people getting help going from 2D to 3D but no one else having this (reverse) issue.
Any suggestions? Thanks.
-Len
PS: I’m using 4.0.9 Gold on Mac (Lion).