try add View.renderer = Renderer.CORRECT_Z_ORDER; Fabrice
On Mar 30, 2010, at 9:50 AM, martinillo wrote: > Hi all, > i am very new to away3d and i am loving it. but now i face a (maybe > stupid) problem in displaying a simple model with alpha. the problem > is visible here: > > http://groups.google.com/group/away3d-dev/web/house3d.JPG > > has anyone an idea how to avoid this display error marked with the red > arrow? I would really appreciate it! > Thank you very much in advance! > martinillo > > > my code: > > private var mat1:ShadingColorMaterial=new > ShadingColorMaterial("white", {alpha:.5, specular:"gray", > diffuse:"grey"}); > private var mat2:ShadingColorMaterial=new ShadingColorMaterial("red", > {alpha:.5, specular:"gray", diffuse:"grey"}); > public function house() > { > camera = new HoverCamera3D({zoom:60, focus:200, distance:1}); > var loader:LoaderCube = Collada.load("element2.dae", {bothsides:true, > material:mat1}) as LoaderCube; > loader.addOnSuccess(onLoaderSuccess); > View.scene.addChild(loader); > var light:DirectionalLight3D = new DirectionalLight3D({color:0xFFFFFF, > ambient:0.25, diffuse:0.75, specular:0.9}); > View.scene.addChild(light); > } > private function onLoaderSuccess(e:Loader3DEvent):void > { > model = e.loader.handle as ObjectContainer3D; > model.ownCanvas = true; > model.children[0].faces[13].material= mat2; > } > private function onEnterFrame(e:Event):void > { > camera.hover(); > View.render(); > } > > To unsubscribe from this group, send email to > away3d-dev+unsubscribegooglegroups.com or reply to this email with the words > "REMOVE ME" as the subject. To unsubscribe from this group, send email to away3d-dev+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
