Hi Ralph,
I just had a go at this and the Cylinder renders nicely behind the
trident in all my cases? I'm using the latest version from SVN.

Here's my code:

package
{
        import away3d.containers.View3D;
        import away3d.core.math.Number3D;
        import away3d.core.render.*;
        import away3d.lights.DirectionalLight3D;
        import away3d.materials.*;
        import away3d.primitives.Cylinder;
        import away3d.primitives.Trident;

        import flash.display.BitmapData;
        import flash.display.Sprite;

        public class PhongBug extends Sprite
        {
                public function PhongBug()
                {
                        super();
                        var view:View3D = new View3D({x:250,y:150});
                        this.addChild(view);
                        //var mat:ShadingColorMaterial = new 
ShadingColorMaterial
(0xFFFFFF);  // Renders correctly
                        // var mat:PhongColorMaterial = new PhongColorMaterial
(0xFFFFFF); // Cylinder appears in front of Trident
                        var mat:PhongBitmapMaterial = new 
PhongBitmapMaterial(new BitmapData
(1, 1, false, 0xFFFFFF )); // Same problem
                        var cyl:Cylinder = new Cylinder();
                        cyl.material = mat;
                        cyl.x = -100; cyl.z = -100;

                        var trident:Trident = new Trident();
                        view.scene.addChildren(cyl, trident);

                        var light:DirectionalLight3D;
                        light = new DirectionalLight3D({color:0xFFFFFF, 
ambient:0.2,
diffuse:.5, specular:0.25});
                        light.x = 6000; light.z = -6000; light.y = 9000;
                        view.scene.addChild(light);
                        view.camera.moveTo(2000, 2000, 2000); // Away3D 2.2 & 
2.3 syntax
                        view.camera.lookAt(new Number3D(0, 0, 0));
                        view.camera.zoom = 20;
                        view.renderer = Renderer.CORRECT_Z_ORDER;
                        view.render();
                }
        }
}

Reply via email to