well, there is an explode class, in geom package where if you pass boolean "uniquemesh"
all meshes are independant meshes of one face...
here an example. http://www.closier.nl/playground/headexploded.swf I have a post with many examples of the new classes I need to finish... Fabrice On Jul 1, 2009, at 7:14 PM, ben wrote:
well hello !! feel fine ? here is a method to split every polygone of a mesh and create independant new faces and simaulate an explosion : private function explode(sour:Object3D):void { for(i=0;i<Mesh(sour).geometry.faces.length;i++) { var cont:ObjectContainer3D = new ObjectContainer3D();//a container to get all the new faces scene.addChild(cont); var fac:Face = Mesh(sour).geometry.faces[i] as Face; ref to every face of the mesh var newfac:Face = new Face(fac.v0, fac.v1, fac.v2);//create another face var me:Mesh = new Mesh();//create a new mesh: 1 mesh>>1 face me.addFace(newfac); cont.addChild(Object3D(me));//add the new objects to the container faceExplosion[i] = me; cont.position = sour.position;//place the cont to our source position cont.transform = Object3D(sour).transform;// use its transform me.bothsides = true; TweenMax.to(me,.2,{delay:.05*i,x:me.x+Math.random()*30-15,z:me.z+Math.random()*30-15,y:me.y +Math.random()*30-15,rotationX:Math.random()*120,rotationY:Math.random()*120}); } Object3D(sour).visible = false; } the problem I have is taht it's impossible to me to get the material of the source and to assign to the face, the method here : for each(var f:Face in me.faces)f.material = fac.material as ITriangleMaterial trow no error but display a wirecolor material and I tested some other method (that usually works) and always get a null error from the abstractrendersession drawTriangle method.. Am I blind ?
