Bounds.height dont work

Software: Away3D 4.x

maricate, Jr. Member
Posted: 15 May 2013 06:59 PM   Total Posts: 36

var campoFrenteGeometria:PlaneGeometry = new PlaneGeometry(1700,300);
var campoFrenteMaterial:ColorMaterial = new ColorMaterial( 0x000000 );
var campoFrente:Mesh = new Mesh(campoFrenteGeometria, campoFrenteMaterial);

cena.addChild(campoFrente);

Bounds.getMeshBounds(campoFrente);
trace(Bounds.height);
trace(Bounds.width);

Its return the height = 0…

What im doing wrong?
Im using A3D gold 4.0.9

   

maricate, Jr. Member
Posted: 15 May 2013 07:07 PM   Total Posts: 36   [ # 1 ]

My fault…
When create a plane… there are width and height.
When add to stage, its converted to width, depth and height.
So, the right is:

trace(Bounds.depth);
trace(Bounds.width);

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X