Camera.screen method in 4.x

Software: Away3D 4.x

3dNewb, Sr. Member
Posted: 29 October 2011 01:46 PM   Total Posts: 105

Or any other method to get 2d Coords of a 3d Object smile

   

patmat, Newbie
Posted: 31 October 2011 06:14 PM   Total Posts: 8   [ # 1 ]

I’d like to know about this too.

   

3dNewb, Sr. Member
Posted: 31 October 2011 07:41 PM   Total Posts: 105   [ # 2 ]

I did find this little solution: http://away3d.com/forum/viewthread/295/

I use it as a static function:

public static function getStagePosition(cam:Camera3Dobj:ObjectContainer3Dview:View3D):Vector3D 
  {
   
var camT:Matrix3D cam.viewProjection.clone();
   var 
planT:Matrix3D obj.sceneTransform.clone();
   
camT.prepend(planT);
   
   var 
pv:Vector3D Utils3D.projectVector(camT, new Vector3D());
   
pv.= (pv.view.width 2) + view.width 2
   pv
.y  = (pv.y*-view.height 2) + view.height 2
   
return pv;
  
   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X