inverting Clone inverts Original ???

Software: Away3D 4.x

drbii, Member
Posted: 27 August 2014 02:32 PM   Total Posts: 72

Is this typical?  I made a clone of a mesh and want to invert it’s faces to use as the inside of the mesh.  When I invert the clone the original mesh is inverted as well.  How do you avoid this???

away3dView.scene.addChild(L1L2Discnurb);
   var 
L1L2Discnurb_inside:Mesh L1L2Discnurb.clone() as Mesh;
   
   
MeshHelper.invertFaces(L1L2Discnurb_inside);
   
L1L2Discnurb_inside.scale(.95);
   
L1L2Discnurb.addChild(L1L2Discnurb_inside); 
   

Avatar
Fabrice Closier, Administrator
Posted: 27 August 2014 02:42 PM   Total Posts: 1265   [ # 1 ]

Copy the buffers into a new geometry and new mesh. invert after that.

if both inside and outside materials are identical for both meshes, set property bothSides to true on the material(s). You do not need then to have 2 meshes.

   

drbii, Member
Posted: 27 August 2014 03:15 PM   Total Posts: 72   [ # 2 ]

I crown thee “Bacon Saver!”

Thanks Fabrice…material.bothSides is exactly what I wanted!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X