Thanks Peter ;)
I should have set OT in my subject and fix that 3D to 2D mistake.
I mean a cos sin formula without using Away. Like first transforming to
X and Z and then to Y if I remember right, with the newscale using fov
first...looks like that:
var newscale:Number = fov / ( fov + z );
clip.scaleX = clip.scaleY = newscale * scale;
clip.x = centreX + x * newscale;
clip.y = centreY + y * newscale;
ok maybe I was just blind.
that should do it:
var newscale:Number = fov / ( fov + z );
x2d = x*newscale;
y2d = y*newscale;
But I remember somthing a bit more complexe -> accurate maybe
Laurent
Peter Kapelyan a écrit :
http://away3d.com/examples.php?example=417&viewhtml=1
<http://away3d.com/examples.php?example=417&viewhtml=1>
I put it there just for you, also because I noticed we didn't have any
example there( for some reason).
-Pete
On Tue, May 12, 2009 at 2:13 PM, laurent <[email protected]
<mailto:[email protected]>> wrote:
Hey guys,
I'm looking for the simplest formula to convert 3D coordinate to
2D screen ones.
Like in Keith Peters book, I can't find my book and my old code
also. Any on can make a fast copy/past for me?
Thanks
Laurent
--
___________________
Actionscript 3.0 Flash 3D Graphics Engine
HTTP://AWAY3D.COM