lightPicker does not work collectly after I adjusted vertexData

Software: Away3D 4.x

polig, Newbie
Posted: 19 April 2012 06:40 AM   Total Posts: 18

Sombody please help! I changed the mesh’s figure by adjusting vertexData of geometry like following code

******************************************
//create mesh
var geo:PlaneGeometry = new PlaneGeometry();
var mat:ColorMaterial = new ColorMaterial( 0xFF0000 );
mat.lightPicker = lightPicker; //StaticLightPicker
var mesh:Mesh = new Mesh( geo, mat );

//adjust vertices data
var vertices : Vector.<Number> = geo.subGeometries[0].vertexData;
vertices[0] = 200; // x change a vertex point like this
vertices[1] = 200; // y
vertices[2] = 200; // z
geo.subGeometries[0].updateVertexData(vertices);

scene.addChild( mesh );
******************************************

I could change the figure as I wished, but the color that is supposed to be effected by lightPicker was not updated collectly . it is same before I change the figure .

How can I update the lighted color with the new figure ?

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X