Hi John, I've just tested your function and unfortunately it produces the same view/object/camera distortion as I already mentioned above. The XY position is correct though.
to picture the problem: case1: no distortion ---> 'viewProjection' being cloned from a camera-dummy (nor added to view, but same specs as used camera): http://www.vatrobot.de/molehill_broomstick/pics/no_distortion.jpg case2 (as with your function too): strange distortion ---> 'viewProjection' being cloned directly from used camera (added to view and used for rendering): http://www.vatrobot.de/molehill_broomstick/pics/strange_distortion_after_clone.jpg I've actually already located the problem I think: camera.viewProjection and cloning. (additional info: I'm using a camera and a perpective lens). @everybody: very simple to test: set up the scene + clone. I'd be glad to get this issue confirmed. Thanks! Vatro On 12 Apr., 15:14, John Brookes <jbp...@googlemail.com> wrote: > I did it this way > > private function getStagePosition(cam:Camera3D, > obj:ObjectContainer3D):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.x = (pv.x * stage.stageWidth / 2) + stage.stageWidth / 2 > pv.y = (pv.y*-1 * stage.stageHeight / 2) + stage.stageHeight / 2 > return pv; > > } > > Not really fully tested, but "seemed" to work.