I'm currently transforming some objects to make them appear far away using a PerspectiveTransform
. This works well, but I have no way of knowing where on the screen the object is displayed. The x and y coordinates are the coordinates of the object if it were at z=0
. How can I compute the display coordinates of my component?
views:
14answers:
1
Q:
What are the coordinates of a display object that has been transformed with a PerspectiveProjection?
A:
What about the flash.display.DisplayObject
's localToGlobal
and globalToLocal
methods? Each takes a point from the first space and returns a transformed point in the second space.
EDIT:
Also see the local3DtoGlobal
and globalToLocal3D
methods for 3D transformations.
Ryan Lynch
2010-07-20 20:25:37