Jeez . I wanted to try this and started a small object... and I just realised that at the end of the day, it was not considered as a "mesh" on the class point of view...
I'll search the group for a tut to build an object completly from scratch Before I try and err, is that the way to do it?? to keep simple to do some kind of "flat"object in my Object Init sequence: // Materials material1 = new ColorMaterial (0xCC0FFF); material2 = new ColorMaterial (0xCCCCCC); // Vertices var v1:Vertex = new Vertex (0,0,0); var v2:Vertex = new Vertex (50,50,0); var v3:Vertex = new Vertex (50, -50, 0); var v4:Vertex = new Vertex (-50,50,0); var v5:Vertex = new Vertex (-50,-50,0); // Faces to create a "butterfly" with 2 different materials var face_1:new Face(v1,v2,v3); face_1.material=material1; var face_2:new Face(v1,v4,v5); face_2.material=material2; // Mesh var mesh0 = new Mesh(); mesh0.addFace(face_1); mesh0.addFace(face_2); mesh0.bothsides=true; // to have bothsides. But this is where I'm "stuck". if I do a: scene.addChild(mesh0); the compiler tells me that the mesh is not an object. What am I forgetting? On 22 fév, 15:33, John Brookes <[email protected]> wrote: > You can use vertex adjust > eg > > private function morphIt(fromM:Mesh, tooM:Mesh):void > { > //should have a check to make sure both mesh have equal vertices > for (var i:int = 0; i < fromM.geometry.vertices.length; i++) > { > fromM.geometry.vertices[i].adjust(tooM.geometry.vertices[i].x, > tooM.geometry.vertices[i].y, tooM.geometry.vertices[i].z ,0.1) > } > > }
