TextField on Plane in 4.0

Software: Away3D 4.x

JoeMac, Newbie
Posted: 06 August 2012 12:24 AM   Total Posts: 7

(Originally posted as a reply to: http://away3d.com/forum/viewthread/2989/)

I have a similar issue, but in 4.0.  I was thinking that if I could get the screen coordinates of my mesh, I could create a flash sprite, and have it added as a child of a Flex 4 container.  I can’t seem to translate the coordinates to screen, though.  I used to use something like:

var _screenVertex:Vector3D
_screenVertex= cam.screen(_sphere,_sphere.vertices[0]);

But I can’t figure it out now.  I did create a bitmapmaterial, with textfield embedded, but the surrounding material gets in the way.  If I could alpha 0, the material, but not the text, it would work.  But right now, it blocks some of my sphere meshes.  (4.0 is awesome, by the way.  Great job!)

Thanks.

   

Richard Olsson, Administrator
Posted: 06 August 2012 07:14 AM   Total Posts: 1192   [ # 1 ]

I moved your question to a separate thread.

Are you sure you are using the latest (or even a very recent) version of Away3D 4.0? There is no BitmapData, no “vertices” property and no Camera3D.screen() method in Away3D 4.0.

What you can do though is use Camera3D.project() to project the top left corner (and if you need scale, bottom right as well) of your plane and then use that to position your regular TextField in the display list.

   

JoeMac, Newbie
Posted: 12 October 2012 02:34 PM   Total Posts: 7   [ # 2 ]

Camera3D.project() worked perfectly for what I needed.  Thanks for your help!

   

GameDesigner, Jr. Member
Posted: 24 October 2012 05:54 PM   Total Posts: 33   [ # 3 ]

Hi smile
Can you please post a snippet of your solution? Thanks smile

JoeMac - 12 October 2012 02:34 PM

Camera3D.project() worked perfectly for what I needed.  Thanks for your help!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X