SOLVED my mistake, the error was ocurring because I was trying to access the method before the
view.render(); when no Matrix3D being created yet! On 14 dez, 11:47, marlus <[email protected]> wrote: > Sorry, > just now I found the thread "Screen coordinates of a 3d object in > away3dlite"http://groups.google.com/group/away3d-dev/browse_thread/thread/8dc4ce... > > but when i try to use the viewMatrix3D method, like the code: > > tooltip.x = do3d.viewMatrix3D.position.x / > do3d.viewMatrix3D.position.z; > tooltip.y = do3d.viewMatrix3D.position.y / > do3d.viewMatrix3D.position.z; > > I get the error: can't access a property or method of a null object > reference > > Anyone knows why? > > On 14 dez, 02:58, Li <[email protected]> wrote: > > > In Away3D you can use the screen method of Camera3D to obtain the screen > > coordinates of a 3D object. > > In Away3DLite you access the viewMatrix of an Object3D. The position > > property of this matrix gives you a Vector3D X, Y, Z. screen x = X/Z, screen > > y = Y/Z. > >
