Layering problem with Mesh objects

Software: Away3D 3.x

SimonLucas, Newbie
Posted: 08 August 2014 10:45 AM   Total Posts: 2

Hi. I’m new to away3d but have created a stack of individual cards. Each card uses Face vectors drawn in a Mesh object and added to individual ObjectContainer3D objects. These card-objects are then stacked in space along the z.

Then I have to add a title to the cards. TextField3D was causing problems, so, to keep things easy I created a static vector symbol in an SWF and embedded it. Used ‘Swf.parse’ to turn it into a ObjectContainer3D object. Then addChild on top of the Mesh in the card.

It works but some of the SWF vector layers are visible through cards higher in the z sorting layer. The background Mesh does not have the same problem and is opaque to cards below it.

Is there anyway to fix this, please? I’m stuck!

Please see image. Main code for a card below:

[Embed(source="TextTest.swf"mimeType "application/octet-stream")]
  
private var SwfData:Class;
  
  public function 
A2IndexCard(cardIndex:uint):void
  {
   this
.cardIndex=cardIndex;
   
/*var tStarSwf : ByteArray = new TStarSwf() as ByteArray;
      VectorText.extractFont(tStarSwf);*/
   
  
}
  
  
public function loadSWF():void{
   loadedSWF
Swf.parse(SwfData{libraryClips["TitleText"]})
   
loadedSWF.y=200
   addChild
(loadedSWF)
  
}
  
  
public function drawCard(cardWidth:uint=500cardHeight:uint=300):void{
   
//
   
hOffset=-cardWidth/2
   vOffset
=cardHeight+CENTRESPACE
   
   mesh 
= new Mesh()
   
   
mesh.bothsides true;
   var 
material WireColorMaterial = new WireColorMaterial(0x000000);
   
material.wireColor 0xffffff;
   
material.thickness 2;
   
mesh.material material;
   var 
face1:Face = new Face();   
   
face1.moveTo0+hOffset,    0+vOffset,     0);
   
face1.lineTocardWidth+hOffset,  0+vOffset,     0);
   
face1.lineTocardWidth+hOffset,  -cardHeight+vOffset,  0);
   
face1.lineTo0+hOffset,    -cardHeight+vOffset,  0);
   
face1.lineTo0+hOffset,    0+vOffset,     0);
   
   
mesh.addFace(face1);
   
addChild(mesh)
   
loadSWF();
   
   
   
  

You can see two deeper cards through the one at the top

 

   

SimonLucas, Newbie
Posted: 23 August 2014 09:41 AM   Total Posts: 2   [ # 1 ]

No solution to this?

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X