I have simulated a sort of pipe where I keep re-creating cylinder geometries after each other in a loop, this can be viewed here.
http://www.fastswf.com/6kAGPPA
When I create a plane within this ‘pipe’, you can see the texture of the pipe appear through the plane which should not be happening. The weird thing is that it happens only when the plane is near the end of one of cylinder meshes used to simulate the pipe. You can see the issue here.
http://www.fastswf.com/TUfmVbg
When you let it play a little you’ll notice it starts working normally (because the plane is not close to the end of the pipe) and then it starts appearing again…
Code to create the Plane and Pipe Meshes:
var testMaterial:TextureMaterial = new TextureMaterial(new BitmapTexture(new octagon_Bitmap().bitmapData), true, true, true);
testMaterial.alpha = 0.99;
var newMesh:Mesh = new Mesh(new PlaneGeometry(_pipeRadius*2, _pipeRadius*2,1,1,false,false),testMaterial);
pipeMat = new TextureMaterial(new BitmapTexture(new pipeMate().bitmapData), true, true, true);
pipeMat.alpha = 0.4; pipeMat.bothSides = true;
var pipeMesh:Mesh = new Mesh(new CylinderGeometry(_pipeRadius, _pipeRadius,recurringPipeFactor,8,1,true,true,true,false), pipeMat);
pipeMesh.rotationZ += 45;
I have tried playing around with the different alpha properties of the materials with no luck. Any ideas?
Thanks for your help.